@@ -1468,11 +1468,11 @@ let _ = sr4745.enumerated().map { (count, element) in "\(count): \(element)" }
1468
1468
// SR-4738
1469
1469
1470
1470
let sr4738 = ( 1 , ( 2 , 3 ) )
1471
- [ sr4738 ] . map { ( x, ( y, z) ) - > Int in x + y + z }
1471
+ [ sr4738 ] . map { ( x, ( y, z) ) - > Int in x + y + z } // expected-note 2 {{'x' declared here}}
1472
1472
// expected-error@-1 {{closure tuple parameter does not support destructuring}} {{20-26=arg1}} {{38-38=let (y, z) = arg1; }}
1473
1473
// expected-warning@-2 {{unnamed parameters must be written with the empty name '_'}} {{20-20=_: }}
1474
- // expected-error@-3 {{cannot find type 'y' in scope}}
1475
- // expected-error@-4 {{cannot find type 'z' in scope}}
1474
+ // expected-error@-3 {{cannot find 'y' in scope; did you mean 'x'? }}
1475
+ // expected-error@-4 {{cannot find 'z' in scope; did you mean 'x'? }}
1476
1476
1477
1477
// rdar://problem/31892961
1478
1478
let r31892961_1 = [ 1 : 1 , 2 : 2 ]
@@ -1482,9 +1482,8 @@ let r31892961_2 = [1, 2, 3]
1482
1482
let _: [ Int ] = r31892961_2. enumerated ( ) . map { ( ( index, val) ) in
1483
1483
// expected-error@-1 {{closure tuple parameter does not support destructuring}} {{48-60=arg0}} {{3-3=\n let (index, val) = arg0\n }}
1484
1484
// expected-warning@-2 {{unnamed parameters must be written with the empty name '_'}} {{48-48=_: }}
1485
- // expected-error@-3 {{cannot find type 'index' in scope}}
1486
- // expected-error@-4 {{cannot find type 'val' in scope}}
1487
1485
val + 1
1486
+ // expected-error@-1 {{cannot find 'val' in scope}}
1488
1487
}
1489
1488
1490
1489
let r31892961_3 = ( x: 1 , y: 42 )
@@ -1695,7 +1694,7 @@ class Mappable<T> {
1695
1694
}
1696
1695
1697
1696
let x = Mappable ( ( ) )
1698
- // expected-note@-1 2 {{'x' declared here}}
1697
+ // expected-note@-1 4 {{'x' declared here}}
1699
1698
x. map { ( _: Void ) in return ( ) }
1700
1699
x. map { ( _: ( ) ) in ( ) }
1701
1700
0 commit comments