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
guardlet self =selfelse{return} // expected-warning {{unexpected warning produced: value 'self' was defined but never used; consider replacing with boolean test}}
793
+
guardlet self =selfelse{return} // expected-warning {{value 'self' was defined but never used; consider replacing with boolean test}}
794
794
method() // expected-warning {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}}
795
795
}
796
796
797
797
doVoidStuffNonEscaping{[weak self]in
798
-
guardlet self =selfelse{return} // expected-warning {{unexpected warning produced: value 'self' was defined but never used; consider replacing with boolean test}}
798
+
guardlet self =selfelse{return} // expected-warning {{value 'self' was defined but never used; consider replacing with boolean test}}
799
799
doVoidStuff{ // expected-note {{capture 'self' explicitly to enable implicit 'self' in this closure}}
800
800
method() // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note {{reference 'self.' explicitly}}
801
801
}
802
802
}
803
803
804
804
doVoidStuffNonEscaping{[weak self]in
805
-
guardlet self =self??TestImplicitSelfForWeakSelfCapture.staticOptional else{return} // expected-warning {{unexpected warning produced: value 'self' was defined but never used; consider replacing with boolean test}}
805
+
guardlet self =self??TestImplicitSelfForWeakSelfCapture.staticOptional else{return} // expected-warning {{value 'self' was defined but never used; consider replacing with boolean test}}
806
806
method() // expected-warning {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}}
0 commit comments