Fixed name resolution error in findByName
This commit is contained in:
parent
c85fff8f67
commit
39a84182b0
|
@ -714,6 +714,8 @@ proc findByName(self: Compiler, name: string): seq[Name] =
|
||||||
## with the given name. Returns all objects that apply
|
## with the given name. Returns all objects that apply
|
||||||
for obj in reversed(self.names):
|
for obj in reversed(self.names):
|
||||||
if obj.name.token.lexeme == name:
|
if obj.name.token.lexeme == name:
|
||||||
|
if obj.isPrivate and obj.owner != self.currentModule:
|
||||||
|
continue
|
||||||
result.add(obj)
|
result.add(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue