Skip to content

Commit 40a29b8

Browse files
committed
[test] Add a test case for fix of PR #18153
1 parent fcf9cfb commit 40a29b8

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
@@ -12,3 +12,15 @@ class CrashTest {
1212
}
1313
// CHECK: [[@LINE+1]]:13 | instance-method/Swift | returnSelf
1414
CrashTest().returnSelf(["": 0]).something()
15+
16+
class CrashTest2 {
17+
// CHECK: [[@LINE+1]]:8 | instance-method/Swift | bar
18+
func bar() {
19+
someClosure { [weak self] in
20+
guard let sSelf = self else { return }
21+
22+
let newDataProvider = Foo()
23+
newDataProvider.delegate = sSelf
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)