Skip to content

Commit 1b72559

Browse files
committed
unified: Add comment regarding local namespace in an extension
1 parent 22ae803 commit 1b72559

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ predicate valueStep(NameBindingNode node1, NameBindingNode node2) {
262262
node2 = getNodeFromRef(p.getSubPattern())
263263
)
264264
or
265+
// Extensions have access to the members of the entity they extend.
266+
// TODO: The type parameters of the target type should also be in the local scope (for Swift).
265267
exists(ClassLikeDeclaration extension |
266268
node1 = getNodeFromRef(extension.getExtensionTarget()) and
267269
node2.isLocalNamespace(extension)

0 commit comments

Comments
 (0)