Skip to content

Commit 41137be

Browse files
akyrtziNathan Hawes
authored andcommitted
[test] Add a test case for fix of PR swiftlang#18153
1 parent a8644f5 commit 41137be

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/Index/invalid_code.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,15 @@ class CrashTest {
1818
}
1919
// CHECK: [[@LINE+1]]:13 | instance-method/Swift | returnSelf
2020
CrashTest().returnSelf(["": 0]).something()
21+
22+
class CrashTest2 {
23+
// CHECK: [[@LINE+1]]:8 | instance-method/Swift | bar
24+
func bar() {
25+
someClosure { [weak self] in
26+
guard let sSelf = self else { return }
27+
28+
let newDataProvider = Foo()
29+
newDataProvider.delegate = sSelf
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)