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
[Trailing closures] Reinstate the "skip defaulted argument" heuristic.
My experiment to improve source compatibility by also performing a
backward scan removed the SE-0286 heuristic that skipped binding
the unlabeled trailing closure to a defaulted parameter when that
would fail. Reinstate that heuristic, which makes more existing code
work with the forward-scan behavior.
This makes my source-compatibility improvements a quality-of-implementation
@@ -98,5 +98,5 @@ func notAmbiguous3( // expected-note{{'notAmbiguous3(x:a:y:b:_:c:)' declared her
98
98
){}
99
99
100
100
func testNotAmbiguous3(){
101
-
notAmbiguous3{ $0 } // expected-warning{{backward matching of the unlabeled trailing closure is deprecated; label the argument with '_' to suppress this warning}}
doSomething{ x in // expected-warning{{backward matching of the unlabeled trailing closure is deprecated; label the argument with 'onCompletion' to suppress this warning}}
0 commit comments