@@ -30,10 +30,10 @@ public func testSimpleWrapperParameter(@Wrapper value: Int) {
30
30
_ = $value
31
31
32
32
// property wrapper backing initializer of value #1 in testSimpleWrapperParameter(value:)
33
- // CHECK: sil private [ossa] @$s26property_wrapper_parameter26testSimpleWrapperParameter5valueyAA0F0VySiG_tFACL_SivpfP : $@convention(thin) (Int) -> Wrapper<Int>
33
+ // CHECK: sil non_abi [serialized] [ossa] @$s26property_wrapper_parameter26testSimpleWrapperParameter5valueyAA0F0VySiG_tFACL_SivpfP : $@convention(thin) (Int) -> Wrapper<Int>
34
34
35
35
// property wrapper init from projected value of value #1 in testSimpleWrapperParameter(value:)
36
- // CHECK: sil private [ossa] @$s26property_wrapper_parameter26testSimpleWrapperParameter5valueyAA0F0VySiG_tFACL_SivpfW : $@convention(thin) (Projection<Int>) -> Wrapper<Int>
36
+ // CHECK: sil non_abi [serialized] [ossa] @$s26property_wrapper_parameter26testSimpleWrapperParameter5valueyAA0F0VySiG_tFACL_SivpfW : $@convention(thin) (Projection<Int>) -> Wrapper<Int>
37
37
38
38
// getter of $value #1 in testSimpleWrapperParameter(value:)
39
39
// CHECK: sil private [ossa] @$s26property_wrapper_parameter26testSimpleWrapperParameter5valueyAA0F0VySiG_tF6$valueL_AA10ProjectionVySiGvg : $@convention(thin) (Wrapper<Int>) -> Projection<Int>
@@ -184,3 +184,29 @@ func testImplicitPropertyWrapper(projection: ProjectionWrapper<Int>) {
184
184
// getter of value #1 in closure #2 in implicit closure #2 in testImplicitPropertyWrapper(projection:)
185
185
// CHECK: sil private [ossa] @$s26property_wrapper_parameter27testImplicitPropertyWrapper10projectionyAA010ProjectionG0VySiG_tFSi_AFtAFcfu0_Si_AFtAFcfU0_5valueL_Sivg : $@convention(thin) () -> Int
186
186
}
187
+
188
+ @propertyWrapper
189
+ public struct PublicWrapper < T> {
190
+ public var wrappedValue : T
191
+
192
+ public init ( wrappedValue: T ) {
193
+ self . wrappedValue = wrappedValue
194
+ }
195
+
196
+ public var projectedValue : PublicWrapper < T > {
197
+ return self
198
+ }
199
+
200
+ public init ( projectedValue: PublicWrapper < T > ) {
201
+ self . wrappedValue = projectedValue. wrappedValue
202
+ }
203
+ }
204
+
205
+ // CHECK-LABEL: sil [ossa] @$s26property_wrapper_parameter10publicFunc5valueyAA13PublicWrapperVySSG_tF : $@convention(thin) (@guaranteed PublicWrapper<String>) -> ()
206
+ public func publicFunc( @PublicWrapper value: String ) {
207
+ // property wrapper backing initializer of value #1 in publicFunc(value:)
208
+ // CHECK: sil non_abi [serialized] [ossa] @$s26property_wrapper_parameter10publicFunc5valueyAA13PublicWrapperVySSG_tFACL_SSvpfP : $@convention(thin) (@owned String) -> @owned PublicWrapper<String>
209
+
210
+ // property wrapper init from projected value of value #1 in publicFunc(value:)
211
+ // CHECK: sil non_abi [serialized] [ossa] @$s26property_wrapper_parameter10publicFunc5valueyAA13PublicWrapperVySSG_tFACL_SSvpfW : $@convention(thin) (@owned PublicWrapper<String>) -> @owned PublicWrapper<String>
212
+ }
0 commit comments