Skip to content

Commit 35c54b1

Browse files
committed
unified: Fix toString and getLocation for TLocalNamespace
1 parent 659da08 commit 35c54b1

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

unified/ql/lib/codeql/unified/internal/StaticNameBinding.qll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ class NameBindingNode extends TNameBindingNode {
5454
this.isExportedNamespace(cls) and result = "ExportedNamespace(" + cls + ")"
5555
)
5656
or
57-
exists(ClassLikeDeclaration cls |
58-
this.isLocalNamespace(cls) and result = "LocalNamespace(" + cls + ")"
59-
)
57+
exists(AstNode n | this.isLocalNamespace(n) and result = "LocalNamespace(" + n + ")")
6058
or
6159
exists(ModuleScopeRepr repr |
6260
this.isModuleScopeNode(repr) and result = "ModuleScope(" + repr + ")"
@@ -74,7 +72,7 @@ class NameBindingNode extends TNameBindingNode {
7472
or
7573
exists(ClassLikeDeclaration cls | this.isExportedNamespace(cls) and result = cls.getLocation())
7674
or
77-
exists(ClassLikeDeclaration cls | this.isLocalNamespace(cls) and result = cls.getLocation())
75+
exists(AstNode n | this.isLocalNamespace(n) and result = n.getLocation())
7876
or
7977
exists(ModuleScopeRepr repr | this.isModuleScopeNode(repr) and result = repr.getLocation())
8078
or

0 commit comments

Comments
 (0)