@@ -52,6 +52,10 @@ func simpleWrapperParameterCaller(projection: Projection<Int>) {
52
52
53
53
testSimpleWrapperParameter ( $value: projection)
54
54
// CHECK: function_ref @$s26property_wrapper_parameter26testSimpleWrapperParameter5valueyAA0F0VySiG_tFACL_SivpfW : $@convention(thin) (Projection<Int>) -> Wrapper<Int>
55
+
56
+ var x : Int = 10
57
+ testSimpleWrapperParameter ( value: x)
58
+ // CHECK: function_ref @$s26property_wrapper_parameter26testSimpleWrapperParameter5valueyAA0F0VySiG_tFACL_SivpfP : $@convention(thin) (Int) -> Wrapper<Int>
55
59
}
56
60
57
61
// CHECK-LABEL: sil [ossa] @$s26property_wrapper_parameter18testGenericWrapper5valueyAA0F0VyxG_tlF : $@convention(thin) <T> (@in_guaranteed Wrapper<T>) -> ()
@@ -71,6 +75,41 @@ func genericWrapperCaller(projection: Projection<Int>) {
71
75
72
76
testGenericWrapper ( $value: projection)
73
77
// CHECK: function_ref @$s26property_wrapper_parameter18testGenericWrapper5valueyAA0F0VyxG_tlFACL_xvpfW : $@convention(thin) <τ_0_0> (@in Projection<τ_0_0>) -> @out Wrapper<τ_0_0>
78
+
79
+ var x : Int = 10
80
+ testGenericWrapper ( value: x)
81
+ // CHECK: function_ref @$s26property_wrapper_parameter18testGenericWrapper5valueyAA0F0VyxG_tlFACL_xvpfP : $@convention(thin) <τ_0_0> (@in τ_0_0) -> @out Wrapper<τ_0_0>
82
+ }
83
+
84
+ @propertyWrapper
85
+ public struct AutoClosureWrapper < T> {
86
+ public var wrappedValue : T
87
+
88
+ // CHECK-LABEL: sil [ossa] @$s26property_wrapper_parameter18AutoClosureWrapperV12wrappedValueACyxGxyXK_tcfC : $@convention(method) <T> (@noescape @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <T>, @thin AutoClosureWrapper<T>.Type) -> @out AutoClosureWrapper<T>
89
+ public init ( wrappedValue: @autoclosure ( ) -> T ) {
90
+ self . wrappedValue = wrappedValue ( )
91
+ }
92
+
93
+ public var projectedValue : Projection < T > {
94
+ Projection ( wrappedValue: wrappedValue)
95
+ }
96
+
97
+ public init ( projectedValue: Projection < T > ) {
98
+ self . wrappedValue = projectedValue. wrappedValue
99
+ }
100
+ }
101
+
102
+ // CHECK-LABEL: sil hidden [ossa] @$s26property_wrapper_parameter22testAutoClosureWrapper5valueyAA0efG0VyxG_tlF : $@convention(thin) <T> (@in_guaranteed AutoClosureWrapper<T>) -> ()
103
+ func testAutoClosureWrapper< T> ( @AutoClosureWrapper value: T ) {
104
+ // property wrapper backing initializer of value #1 in testAutoClosureWrapper<A>(value:)
105
+ // CHECK-LABEL: sil private [ossa] @$s26property_wrapper_parameter22testAutoClosureWrapper5valueyAA0efG0VyxG_tlFACL_xvpfP : $@convention(thin) <T> (@noescape @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <T>) -> @out AutoClosureWrapper<T>
106
+ // CHECK: function_ref @$s26property_wrapper_parameter18AutoClosureWrapperV12wrappedValueACyxGxyXK_tcfC : $@convention(method) <τ_0_0> (@noescape @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <τ_0_0>, @thin AutoClosureWrapper<τ_0_0>.Type) -> @out AutoClosureWrapper<τ_0_0>
107
+ }
108
+
109
+ // CHECK-LABEL: sil hidden [ossa] @$s26property_wrapper_parameter24autoClosureWrapperCalleryyF : $@convention(thin) () -> ()
110
+ func autoClosureWrapperCaller( ) {
111
+ testAutoClosureWrapper ( value: 10 )
112
+ // CHECK: function_ref @$s26property_wrapper_parameter22testAutoClosureWrapper5valueyAA0efG0VyxG_tlFACL_xvpfP : $@convention(thin) <τ_0_0> (@noescape @callee_guaranteed @substituted <τ_0_0> () -> @out τ_0_0 for <τ_0_0>) -> @out AutoClosureWrapper<τ_0_0>
74
113
}
75
114
76
115
// CHECK-LABEL: sil hidden [ossa] @$s26property_wrapper_parameter33testSimpleClosureWrapperParameteryyF : $@convention(thin) () -> ()
0 commit comments