@@ -301,8 +301,8 @@ func testKeyPathSubscript(readonly: Z, writable: inout Z,
301
301
sink = readonly [ keyPath: rkp]
302
302
sink = writable [ keyPath: rkp]
303
303
304
- readonly [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is a read-only key path }}
305
- writable [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is a read-only key path }}
304
+ readonly [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is read-only}}
305
+ writable [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is read-only}}
306
306
readonly [ keyPath: wkp] = sink // expected-error{{cannot assign through subscript: 'readonly' is a 'let' constant}}
307
307
writable [ keyPath: wkp] = sink
308
308
readonly [ keyPath: rkp] = sink
@@ -401,8 +401,8 @@ func testKeyPathSubscriptMetatype(readonly: Z.Type, writable: inout Z.Type,
401
401
sink = readonly [ keyPath: rkp]
402
402
sink = writable [ keyPath: rkp]
403
403
404
- readonly [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is a read-only key path }}
405
- writable [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is a read-only key path }}
404
+ readonly [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is read-only}}
405
+ writable [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is read-only}}
406
406
readonly [ keyPath: wkp] = sink // expected-error{{cannot assign through subscript: 'readonly' is a 'let' constant}}
407
407
writable [ keyPath: wkp] = sink
408
408
readonly [ keyPath: rkp] = sink
@@ -421,8 +421,8 @@ func testKeyPathSubscriptTuple(readonly: (Z,Z), writable: inout (Z,Z),
421
421
sink = readonly [ keyPath: rkp]
422
422
sink = writable [ keyPath: rkp]
423
423
424
- readonly [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is a read-only key path }}
425
- writable [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is a read-only key path }}
424
+ readonly [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is read-only}}
425
+ writable [ keyPath: kp] = sink // expected-error{{cannot assign through subscript: 'kp' is read-only}}
426
426
readonly [ keyPath: wkp] = sink // expected-error{{cannot assign through subscript: 'readonly' is a 'let' constant}}
427
427
writable [ keyPath: wkp] = sink
428
428
readonly [ keyPath: rkp] = sink
0 commit comments