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
// rdar://16889886 - Assert when trying to weak capture a property of self in a lazy closure
344
-
// FIXME: We should probably offer a fix-it to the field capture error and suppress the 'implicit self' error. https://bugs.swift.org/browse/SR-11634
345
-
doStuff{[weak self.field]in field!.foo()} // expected-error {{fields may only be captured by assigning to a specific name}} expected-error {{reference to property 'field' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note {{reference 'self.' explicitly}} {{36-36=self.}} expected-note {{capture 'self' explicitly to enable implicit 'self' in this closure}} {{16-16=self, }}
346
+
doStuff{[weak self.field]in field!.foo()}
347
+
// expected-error@-1{{fields may only be captured by assigning to a specific name}}{{21-21=field = }}
348
+
// expected-error@-2{{reference to property 'field' in closure requires explicit use of 'self' to make capture semantics explicit}}
0 commit comments