@@ -1490,7 +1490,7 @@ do {
14901490 let tuple = ( 1 , ( 2 , 3 ) )
14911491 [ tuple ] . map { ( x, ( y, z) ) - > Int in x + y + z } // expected-note 2 {{'x' declared here}}
14921492 // expected-error@-1 {{closure tuple parameter does not support destructuring}} {{21-27=arg1}} {{39-39=let (y, z) = arg1; }}
1493- // expected-warning @-2 {{unnamed parameters must be written with the empty name '_'}} {{21-21=_: }}
1493+ // expected-error @-2 {{unnamed parameters must be written with the empty name '_'}} {{21-21=_: }}
14941494 // expected-error@-3 {{cannot find 'y' in scope; did you mean 'x'?}}
14951495 // expected-error@-4 {{cannot find 'z' in scope; did you mean 'x'?}}
14961496}
@@ -1501,7 +1501,7 @@ r31892961_1.forEach { (k, v) in print(k + v) }
15011501
15021502let r31892961_2 = [ 1 , 2 , 3 ]
15031503// expected-error@+2 {{closure tuple parameter does not support destructuring}} {{48-60=arg0}} {{+1:3-3=\n let (index, val) = arg0\n }}
1504- // expected-warning @+1 {{unnamed parameters must be written with the empty name '_'}} {{48-48=_: }}
1504+ // expected-error @+1 {{unnamed parameters must be written with the empty name '_'}} {{48-48=_: }}
15051505let _: [ Int ] = r31892961_2. enumerated ( ) . map { ( ( index, val) ) in
15061506 val + 1
15071507 // expected-error@-1 {{cannot find 'val' in scope}}
@@ -1518,13 +1518,13 @@ _ = [r31892961_4].map { x, y in x + y }
15181518let r31892961_5 = ( x: 1 , ( y: 2 , ( w: 3 , z: 4 ) ) )
15191519[ r31892961_5 ] . map { ( x: Int, ( y: Int, ( w: Int, z: Int) ) ) in x + y } // expected-note {{'x' declared here}}
15201520// expected-error@-1 {{closure tuple parameter does not support destructuring}} {{30-56=arg1}} {{61-61=let (y, (w, z)) = arg1; }}
1521- // expected-warning @-2 {{unnamed parameters must be written with the empty name '_'}} {{30-30=_: }}
1521+ // expected-error @-2 {{unnamed parameters must be written with the empty name '_'}} {{30-30=_: }}
15221522// expected-error@-3{{cannot find 'y' in scope; did you mean 'x'?}}
15231523
15241524let r31892961_6 = ( x: 1 , ( y: 2 , z: 4 ) )
15251525[ r31892961_6 ] . map { ( x: Int, ( y: Int, z: Int) ) in x + y } // expected-note {{'x' declared here}}
15261526// expected-error@-1 {{closure tuple parameter does not support destructuring}} {{30-46=arg1}} {{51-51=let (y, z) = arg1; }}
1527- // expected-warning @-2 {{unnamed parameters must be written with the empty name '_'}} {{30-30=_: }}
1527+ // expected-error @-2 {{unnamed parameters must be written with the empty name '_'}} {{30-30=_: }}
15281528// expected-error@-3{{cannot find 'y' in scope; did you mean 'x'?}}
15291529
15301530// rdar://problem/32214649 -- these regressed in Swift 4 mode
0 commit comments