You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/expr/closure/closures_swift6.swift
+17-12Lines changed: 17 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -501,14 +501,14 @@ class TestGithubIssue70089 {
501
501
}
502
502
503
503
doVoidStuff{[weak self]in
504
-
doVoidStuff{[self]in
505
-
x +=1 // expected-error@-1 {{value of optional type 'TestGithubIssue70089?' must be unwrapped to a value of type 'TestGithubIssue70089'}} expected-note@-1 {{coalesce using '??' to provide a default when the optional value contains 'nil'}} expected-note@-1 {{force-unwrap using '!' to abort execution if the optional value contains 'nil'}}
504
+
doVoidStuff{[self]in // expected-error {{value of optional type 'TestGithubIssue70089?' must be unwrapped to a value of type 'TestGithubIssue70089'}} expected-note {{coalesce using '??' to provide a default when the optional value contains 'nil'}} expected-note {{force-unwrap using '!' to abort execution if the optional value contains 'nil'}}
505
+
x +=1
506
506
}
507
507
}
508
508
509
509
doVoidStuff{[weak self]in
510
-
doVoidStuff{[self]in //
511
-
self.x +=1 // expected-error@-1 {{value of optional type 'TestGithubIssue70089?' must be unwrapped to a value of type 'TestGithubIssue70089'}} expected-note@-1 {{coalesce using '??' to provide a default when the optional value contains 'nil'}} expected-note@-1 {{force-unwrap using '!' to abort execution if the optional value contains 'nil'}}
510
+
doVoidStuff{[self]in // expected-error {{value of optional type 'TestGithubIssue70089?' must be unwrapped to a value of type 'TestGithubIssue70089'}} expected-note {{coalesce using '??' to provide a default when the optional value contains 'nil'}} expected-note {{force-unwrap using '!' to abort execution if the optional value contains 'nil'}}
0 commit comments