@@ -1468,11 +1468,11 @@ let _ = sr4745.enumerated().map { (count, element) in "\(count): \(element)" }
14681468// SR-4738
14691469
14701470let 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}}
14721472// expected-error@-1 {{closure tuple parameter does not support destructuring}} {{20-26=arg1}} {{38-38=let (y, z) = arg1; }}
14731473// 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'? }}
14761476
14771477// rdar://problem/31892961
14781478let r31892961_1 = [ 1 : 1 , 2 : 2 ]
@@ -1482,9 +1482,8 @@ let r31892961_2 = [1, 2, 3]
14821482let _: [ Int ] = r31892961_2. enumerated ( ) . map { ( ( index, val) ) in
14831483 // expected-error@-1 {{closure tuple parameter does not support destructuring}} {{48-60=arg0}} {{3-3=\n let (index, val) = arg0\n }}
14841484 // 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}}
14871485 val + 1
1486+ // expected-error@-1 {{cannot find 'val' in scope}}
14881487}
14891488
14901489let r31892961_3 = ( x: 1 , y: 42 )
@@ -1695,7 +1694,7 @@ class Mappable<T> {
16951694}
16961695
16971696let x = Mappable ( ( ) )
1698- // expected-note@-1 2 {{'x' declared here}}
1697+ // expected-note@-1 4 {{'x' declared here}}
16991698x. map { ( _: Void ) in return ( ) }
17001699x. map { ( _: ( ) ) in ( ) }
17011700
0 commit comments