@@ -27,6 +27,9 @@ public class C: Hashable {
27
27
public func hash(into hasher: inout Hasher)
28
28
public static func ==(_: C, _: C) -> Bool
29
29
}
30
+ public class GC<T> {
31
+ public final var x: T
32
+ }
30
33
31
34
public struct G<T> {
32
35
public var x: T { get set }
@@ -299,6 +302,14 @@ sil_vtable C2 {}
299
302
// CHECK-32-SAME: i32 24 }>
300
303
// CHECK-64-SAME: i32 48 }>
301
304
305
+ // -- %gcx: GC<T>.x
306
+ // CHECK: [[KP_GCX:@keypath(\..*)?]] = private global <{ {{.*}} }> <{
307
+ // CHECK-SAME: @"generic environment l"
308
+ // CHECK-SAME: @"symbolic 8keypaths2GCCyxG"
309
+ // CHECK-SAME: @"symbolic x"
310
+ // -- class with runtime-resolved offset, mutable
311
+ // CHECK-SAME: <i32 0x3fffffe>
312
+
302
313
// CHECK-LABEL: @"generic environment SHRzSHR_r0_l" = linkonce_odr hidden constant
303
314
// CHECK-SAME: i32 8193, i16 2, i8 -128, i8 -128, i32 128
304
315
@@ -421,6 +432,14 @@ entry:
421
432
return undef : $()
422
433
}
423
434
435
+ sil @generic_class_stored_final : $@convention(thin) <T> () -> () {
436
+ entry:
437
+ %gcx = keypath $ReferenceWritableKeyPath<GC<T>, T>, <T> (root $GC<T>; stored_property #GC.x: $T) <T>
438
+
439
+ return undef : $()
440
+ }
441
+
442
+
424
443
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @computed_property_generics
425
444
sil @computed_property_generics : $@convention(thin) <T, U> () -> () {
426
445
entry:
0 commit comments