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
x +=1 // expected-error{{reference to property 'x' in closure requires explicit use of 'self' to make capture semantics explicit}}
500
+
}
501
+
}
502
+
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'}}
506
+
}
507
+
}
508
+
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'}}
0 commit comments