Skip to content

Commit

Permalink
Fix scope tree find_visible_ex
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Oct 14, 2024
1 parent 362006a commit 650cc3f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions edb/ir/scopetree.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,9 +873,8 @@ def find_visible_ex(
]:
"""Find the visible node with the given *path_id*."""
namespaces: Set[pathid.Namespace] = set()
finfo = FenceInfo(False, False)
found = None

nodes: List[ScopeTreeNode] = []
for node, ans in self.ancestors_and_namespaces:
if (node.path_id is not None
and _paths_equal(node.path_id, path_id, namespaces)):
Expand All @@ -894,7 +893,11 @@ def find_visible_ex(
namespaces |= ans

if node is not self:
finfo |= node.fence_info_ex(path_id, namespaces)
nodes.append(node)

finfo = FenceInfo(False, False)
for node in nodes:
finfo |= node.fence_info_ex(path_id, namespaces)

if found and found.is_group and not allow_group:
found = None
Expand Down

0 comments on commit 650cc3f

Please sign in to comment.