File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -127,15 +127,16 @@ end
127
127
128
128
# Check if a particular symbol is exported from a standard library module
129
129
function is_exported_from_stdlib (name:: Symbol , mod:: Module )
130
- if (mod === Base || mod === Core) && isexported (mod, name)
131
- return true
132
- end
133
- parent = module_parent (mod)
134
- if parent != = mod && isdefined (mod, name) && isdefined (parent, name) &&
135
- getfield (mod, name) === getfield (parent, name)
136
- return is_exported_from_stdlib (name, parent)
130
+ ! isdefined (mod, name) && return false
131
+ orig = getfield (mod, name)
132
+ while ! (mod === Base || mod === Core)
133
+ parent = module_parent (mod)
134
+ if mod === Main || mod === parent || parent === Main
135
+ return false
136
+ end
137
+ mod = parent
137
138
end
138
- return false
139
+ return isexported (mod, name) && isdefined (mod, name) && getfield (mod, name) === orig
139
140
end
140
141
141
142
function show (io:: IO , f:: Function )
You can’t perform that action at this time.
0 commit comments