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