Skip to content

Commit 7926c7d

Browse files
committed
Unified: Add test for Self access in nested class
1 parent 2d10f98 commit 7926c7d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

unified/ql/test/library-tests/static-name-binding/explicit-instance-field-access.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,11 @@ private class B : A { // $ access=A
4545
return self.z // $ not handled by static name binding
4646
}
4747
}
48+
49+
private class C {
50+
static let x = 1
51+
class D {
52+
static let x = 2
53+
static let foo = Self.x // $ access=C.D access=C.D.x $ SPURIOUS: access=C.x
54+
}
55+
}

0 commit comments

Comments
 (0)