Skip to content

Commit 77b36b6

Browse files
committed
add test for empty subscript
1 parent 808b59a commit 77b36b6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/Interpreter/keypath.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ class Controller {
2929
}
3030
}
3131

32+
subscript() -> Int {
33+
0
34+
}
35+
3236
}
3337

3438
struct S {
@@ -84,4 +88,5 @@ print(\S.a)
8488
print(\Controller[int: 0, str: "", 0])
8589
// CHECK: {{\\Controller\.thirdLabel|\\Controller\.<computed 0x.* \(Optional<MyLabel>\)>}}
8690
print(\Controller.thirdLabel)
87-
91+
// CHECK: {{\\Controller\.subscript\(\)|\\Controller\.<computed 0x.* \(Optional<Int>\)>}}
92+
print(\Controller.[])

0 commit comments

Comments
 (0)