@@ -36,7 +36,7 @@ struct A: Hashable {
36
36
func hash( into hasher: inout Hasher ) { fatalError ( ) }
37
37
}
38
38
struct B { }
39
- struct C < T> { // expected-note 3 {{'T' declared as parameter to type 'C'}}
39
+ struct C < T> { // expected-note 4 {{'T' declared as parameter to type 'C'}}
40
40
var value : T
41
41
subscript( ) -> T { get { return value } }
42
42
subscript( sub: Sub ) -> T { get { return value } set { } }
@@ -224,15 +224,17 @@ func testKeyPathInGenericContext<H: Hashable, X>(hashable: H, anything: X) {
224
224
}
225
225
226
226
func testDisembodiedStringInterpolation( x: Int ) {
227
- \( x) // expected-error{{string interpolation}} expected-error{{}}
228
- \( x, radix: 16 ) // expected-error{{string interpolation}} expected-error{{}}
227
+ \( x) // expected-error{{string interpolation can only appear inside a string literal}}
228
+ \( x, radix: 16 ) // expected-error{{string interpolation can only appear inside a string literal}}
229
229
}
230
230
231
231
func testNoComponents( ) {
232
232
let _: KeyPath < A , A > = \A // expected-error{{must have at least one component}}
233
- let _: KeyPath < C , A > = \C // expected-error{{must have at least one component}} expected-error{{}}
233
+ let _: KeyPath < C , A > = \C // expected-error{{must have at least one component}}
234
234
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
235
- // expected-error@-2 {{cannot convert value of type 'KeyPath<Root, Value>' to specified type 'KeyPath<C<T>, A>'}}
235
+ let _: KeyPath < A , C > = \A // expected-error{{must have at least one component}}
236
+ // expected-error@-1 {{generic parameter 'T' could not be inferred}}
237
+ _ = \A // expected-error {{key path must have at least one component}}
236
238
}
237
239
238
240
struct TupleStruct {
0 commit comments