@@ -8,7 +8,7 @@ let dict2: [Character: _] = ["h": 0]
88let arr = [ _] ( repeating: " hi " , count: 3 )
99
1010func foo( _ arr: [ _ ] = [ 0 ] ) { } // expected-error {{type placeholder may not appear in top-level parameter}}
11- // expected-note@-1 {{replace the placeholder with the correct type 'Int'}}
11+ // expected-note@-1 {{replace the placeholder with the inferred type 'Int'}}
1212
1313let foo = _. foo // expected-error {{could not infer type for placeholder}}
1414let zero : _ = . zero // expected-error {{cannot infer contextual base in reference to member 'zero'}}
@@ -76,32 +76,32 @@ where T: ExpressibleByIntegerLiteral, U: ExpressibleByIntegerLiteral {
7676
7777extension Bar {
7878 func frobnicate2( ) -> Bar < _ , _ > { // expected-error {{type placeholder may not appear in function return type}}
79- // expected-note@-1 {{replace the placeholder with the correct type 'T'}}
80- // expected-note@-2 {{replace the placeholder with the correct type 'U'}}
79+ // expected-note@-1 {{replace the placeholder with the inferred type 'T'}}
80+ // expected-note@-2 {{replace the placeholder with the inferred type 'U'}}
8181 return Bar ( t: 42 , u: 42 )
8282 }
8383 func frobnicate3( ) -> Bar {
8484 return Bar < _ , _ > ( t: 42 , u: 42 )
8585 }
8686 func frobnicate4( ) -> Bar < _ , _ > { // expected-error {{type placeholder may not appear in function return type}}
87- // expected-note@-1 {{replace the placeholder with the correct type 'Int'}}
88- // expected-note@-2 {{replace the placeholder with the correct type 'Int'}}
87+ // expected-note@-1 {{replace the placeholder with the inferred type 'Int'}}
88+ // expected-note@-2 {{replace the placeholder with the inferred type 'Int'}}
8989 return Bar < _ , _ > ( t: 42 , u: 42 )
9090 }
9191 func frobnicate5( ) -> Bar < _ , U > { // expected-error {{type placeholder may not appear in function return type}}
92- // expected-note@-1 {{replace the placeholder with the correct type 'T'}}
92+ // expected-note@-1 {{replace the placeholder with the inferred type 'T'}}
9393 return Bar ( t: 42 , u: 42 )
9494 }
9595 func frobnicate6( ) -> Bar {
9696 return Bar < _ , U > ( t: 42 , u: 42 )
9797 }
9898 func frobnicate7( ) -> Bar < _ , _ > { // expected-error {{type placeholder may not appear in function return type}}
99- // expected-note@-1 {{replace the placeholder with the correct type 'Int'}}
100- // expected-note@-2 {{replace the placeholder with the correct type 'U'}}
99+ // expected-note@-1 {{replace the placeholder with the inferred type 'Int'}}
100+ // expected-note@-2 {{replace the placeholder with the inferred type 'U'}}
101101 return Bar < _ , U > ( t: 42 , u: 42 )
102102 }
103103 func frobnicate8( ) -> Bar < _ , U > { // expected-error {{type placeholder may not appear in function return type}}
104- // expected-note@-1 {{replace the placeholder with the correct type 'Int'}}
104+ // expected-note@-1 {{replace the placeholder with the inferred type 'Int'}}
105105 return Bar < _ , _ > ( t: 42 , u: 42 )
106106 }
107107}
@@ -235,9 +235,9 @@ func mismatchedDefault<T>(_ x: [_] = [String: T]()) {} // expected-error {{type
235235
236236func mismatchedReturnTypes( ) -> _ { // expected-error {{type placeholder may not appear in function return type}}
237237 if true {
238- return " " // expected-note@-2 {{replace the placeholder with the correct type 'String'}}
238+ return " " // expected-note@-2 {{replace the placeholder with the inferred type 'String'}}
239239 } else {
240- return 0.5 // expected-note@-4 {{replace the placeholder with the correct type 'Double'}}
240+ return 0.5 // expected-note@-4 {{replace the placeholder with the inferred type 'Double'}}
241241 }
242242}
243243
@@ -251,6 +251,6 @@ func opaque() -> some _ { // expected-error {{type placeholder not allowed here}
251251enum EnumWithPlaceholders {
252252 case topLevelPlaceholder( x: _ ) // expected-error {{type placeholder may not appear in top-level parameter}}
253253 case placeholderWithDefault( x: _ = 5 ) // expected-error {{type placeholder may not appear in top-level parameter}}
254- // expected-note@-1 {{replace the placeholder with the correct type 'Int'}}
254+ // expected-note@-1 {{replace the placeholder with the inferred type 'Int'}}
255255}
256256
0 commit comments