diff --git a/unified/ql/lib/codeql/unified/internal/LocalNameBinding.qll b/unified/ql/lib/codeql/unified/internal/LocalNameBinding.qll index a944db724c5a..0844fe64bed9 100644 --- a/unified/ql/lib/codeql/unified/internal/LocalNameBinding.qll +++ b/unified/ql/lib/codeql/unified/internal/LocalNameBinding.qll @@ -333,6 +333,12 @@ private module LocalNameBindingInput implements LocalNameBindingInputSig Int { // name=A.type.z + return 789 + } + + class func getZ() { + return self.z // $ not handled by static name binding + } +} + +private class B : A { // $ access=A + func getX2() { + return self.x // not handled by static name binding + } + + func getY3() { + return Self.y // $ access=B access=A.type.y + } + + static func getY4() { + return self.y // $ not handled by static name binding + } + + class func z() -> Int { // name=B.type.z + return 789 + } + + class func getZ2() { + return self.z // $ not handled by static name binding + } +} + +private class C { + static let x = 1 + class D { + static let x = 2 + static let foo = Self.x // $ access=C.D access=C.D.x + } +}