@@ -191,7 +191,7 @@ struct WrapperWithStorageValue<T> {
191
191
192
192
struct UseWrapperWithStorageValue {
193
193
// UseWrapperWithStorageValue._x.getter
194
- // CHECK-LABEL: sil hidden [transparent] [ ossa] @$s17property_wrappers26UseWrapperWithStorageValueV2$xAA0D0VySiGvg : $@convention(method) (UseWrapperWithStorageValue) -> Wrapper<Int>
194
+ // CHECK-LABEL: sil hidden [ossa] @$s17property_wrappers26UseWrapperWithStorageValueV2$xAA0D0VySiGvg : $@convention(method) (UseWrapperWithStorageValue) -> Wrapper<Int>
195
195
// CHECK-NOT: return
196
196
// CHECK: function_ref @$s17property_wrappers23WrapperWithStorageValueV09projectedF0AA0C0VyxGvg
197
197
@WrapperWithStorageValue ( wrappedValue: 17 ) var x : Int
@@ -410,7 +410,44 @@ class TestResilientDI {
410
410
}
411
411
}
412
412
413
+ @propertyWrapper
414
+ public struct PublicWrapper < T> {
415
+ public var wrappedValue : T
416
+
417
+ public init ( value: T ) {
418
+ wrappedValue = value
419
+ }
420
+ }
421
+
422
+ @propertyWrapper
423
+ public struct PublicWrapperWithStorageValue < T> {
424
+ public var wrappedValue : T
425
+
426
+ public init ( wrappedValue: T ) {
427
+ self . wrappedValue = wrappedValue
428
+ }
429
+
430
+ public var projectedValue : PublicWrapper < T > {
431
+ return PublicWrapper ( value: wrappedValue)
432
+ }
433
+ }
413
434
435
+ public class Container {
436
+ public init ( ) {
437
+ }
438
+
439
+ // The accessor cannot be serializable/transparent because it accesses an
440
+ // internal var.
441
+ // CHECK-LABEL: sil [ossa] @$s17property_wrappers9ContainerC10$dontCrashAA13PublicWrapperVySiGvg : $@convention(method) (@guaranteed Container) -> PublicWrapper<Int> {
442
+ // CHECK: bb0(%0 : @guaranteed $Container):
443
+ // CHECK: ref_element_addr %0 : $Container, #Container._dontCrash
444
+ @PublicWrapperWithStorageValue ( wrappedValue: 0 ) public var dontCrash : Int {
445
+ willSet {
446
+ }
447
+ didSet {
448
+ }
449
+ }
450
+ }
414
451
415
452
// CHECK-LABEL: sil_vtable ClassUsingWrapper {
416
453
// CHECK: #ClassUsingWrapper.x!getter.1: (ClassUsingWrapper) -> () -> Int : @$s17property_wrappers17ClassUsingWrapperC1xSivg // ClassUsingWrapper.x.getter
0 commit comments