@@ -69,53 +69,53 @@ struct TestGeneral {
69
69
func sameType< T> ( _: S < T > , _: T . Type ) { }
70
70
71
71
// CHECK-LABEL: sil hidden [ossa] @$s37sendable_to_any_for_generic_arguments11TestGeneralV15test_contextualAA1SVyypGyF
72
- // CHECK: [[V_REF:%.*]] = struct_extract %0, #TestGeneral.v
73
- // CHECK-NEXT: {{.*}} = unchecked_trivial_bit_cast [[V_REF]] to $S<Any>
72
+ // CHECK: [[V_REF:%.*]] = struct_extract %0 : $TestGeneral , #TestGeneral.v
73
+ // CHECK-NEXT: {{.*}} = unchecked_trivial_bit_cast [[V_REF]] : $S<any Sendable> to $S<Any>
74
74
func test_contextual( ) -> S < Any > {
75
75
v
76
76
}
77
77
78
78
// CHECK-LABEL: sil hidden [ossa] @$s37sendable_to_any_for_generic_arguments11TestGeneralV15test_member_refyyF
79
- // CHECK: [[V_REF:%.*]] = struct_extract %0, #TestGeneral.v
80
- // CHECK-NEXT: [[V_WITH_ANY:%.*]] = unchecked_trivial_bit_cast [[V_REF:%.*]] to $S<Any>
79
+ // CHECK: [[V_REF:%.*]] = struct_extract %0 : $TestGeneral , #TestGeneral.v
80
+ // CHECK-NEXT: [[V_WITH_ANY:%.*]] = unchecked_trivial_bit_cast [[V_REF:%.*]] : $S<any Sendable> to $S<Any>
81
81
// CHECK: [[MEMBER_REF:%.*]] = function_ref @$s37sendable_to_any_for_generic_arguments1SVAAypRszlE0C4OnlyyyF : $@convention(method) (S<Any>) -> ()
82
82
// CHECK-NEXT: {{.*}} = apply [[MEMBER_REF]]([[V_WITH_ANY:%.*]]) : $@convention(method) (S<Any>) -> ()
83
83
func test_member_ref( ) {
84
84
v. anyOnly ( )
85
85
}
86
86
87
87
// CHECK-LABEL: sil hidden [ossa] @$s37sendable_to_any_for_generic_arguments11TestGeneralV24test_passing_as_argumentyyF
88
- // CHECK: [[V_REF:%.*]] = struct_extract %0, #TestGeneral.v
89
- // CHECK-NEXT: [[V_ANY:%.*]] = unchecked_trivial_bit_cast [[V_REF]] to $S<Any>
88
+ // CHECK: [[V_REF:%.*]] = struct_extract %0 : $TestGeneral , #TestGeneral.v
89
+ // CHECK-NEXT: [[V_ANY:%.*]] = unchecked_trivial_bit_cast [[V_REF]] : $S<any Sendable> to $S<Any>
90
90
// CHECK: [[MEMBER_REF:%.*]] = function_ref @$s37sendable_to_any_for_generic_arguments11TestGeneralV08accepts_C0yyAA1SVyypGF : $@convention(method) (S<Any>, TestGeneral) -> ()
91
91
// CHECK-NEXT: {{.*}} = apply [[MEMBER_REF]]([[V_ANY]], %0) : $@convention(method) (S<Any>, TestGeneral) -> ()
92
92
func test_passing_as_argument( ) {
93
93
accepts_any ( v)
94
94
}
95
95
96
96
// CHECK-LABEL: sil hidden [ossa] @$s37sendable_to_any_for_generic_arguments11TestGeneralV39test_passing_as_argument_through_member1tyAC_tF
97
- // CHECK: [[V_REF:%.*]] = struct_extract %0, #TestGeneral.v
98
- // CHECK-NEXT: [[V_ANY:%.*]] = unchecked_trivial_bit_cast [[V_REF]] to $S<Any>
97
+ // CHECK: [[V_REF:%.*]] = struct_extract %0 : $TestGeneral , #TestGeneral.v
98
+ // CHECK-NEXT: [[V_ANY:%.*]] = unchecked_trivial_bit_cast [[V_REF]] : $S<any Sendable> to $S<Any>
99
99
// CHECK: [[MEMBER_REF:%.*]] = function_ref @$s37sendable_to_any_for_generic_arguments11TestGeneralV08accepts_C0yyAA1SVyypGF : $@convention(method) (S<Any>, TestGeneral) -> ()
100
100
// CHECK-NEXT: {{.*}} = apply [[MEMBER_REF]]([[V_ANY]], %1) : $@convention(method) (S<Any>, TestGeneral) -> ()
101
101
func test_passing_as_argument_through_member( t: TestGeneral ) {
102
102
accepts_any ( t. v)
103
103
}
104
104
105
105
// CHECK-LABEL: sil hidden [ossa] @$s37sendable_to_any_for_generic_arguments11TestGeneralV23test_complex_contextualAA1SVySayypSgGGyF
106
- // CHECK: [[V_REF:%.*]] = struct_extract %0, #TestGeneral.optV
107
- // CHECK-NEXT: {{.*}} = unchecked_trivial_bit_cast [[V_REF]] to $S<Array<Optional<Any>>>
106
+ // CHECK: [[V_REF:%.*]] = struct_extract %0 : $TestGeneral , #TestGeneral.optV
107
+ // CHECK-NEXT: {{.*}} = unchecked_trivial_bit_cast [[V_REF]] : $S<Array<Optional<any Sendable>>> to $S<Array<Optional<Any>>>
108
108
func test_complex_contextual( ) -> S < [ Any ? ] > {
109
109
optV
110
110
}
111
111
112
112
// CHECK-LABEL: sil hidden [ossa] @$s37sendable_to_any_for_generic_arguments11TestGeneralV26test_complex_with_argument1tyAC_tF
113
- // CHECK: [[SELF_V_REF:%.*]] = struct_extract %1, #TestGeneral.optV
114
- // CHECK-NEXT: [[SELF_V_ANY:%.*]] = unchecked_trivial_bit_cast [[SELF_V_REF]] to $S<Array<Optional<Any>>>
113
+ // CHECK: [[SELF_V_REF:%.*]] = struct_extract %1 : $TestGeneral , #TestGeneral.optV
114
+ // CHECK-NEXT: [[SELF_V_ANY:%.*]] = unchecked_trivial_bit_cast [[SELF_V_REF]] : $S<Array<Optional<any Sendable>>> to $S<Array<Optional<Any>>>
115
115
// CHECK: [[MEMBER_REF_1:%.*]] = function_ref @$s37sendable_to_any_for_generic_arguments11TestGeneralV012accepts_opt_C0yyAA1SVySayypSgGGF : $@convention(method) (S<Array<Optional<Any>>>, TestGeneral) -> ()
116
116
// CHECK-NEXT: {{.*}} = apply [[MEMBER_REF_1]]([[SELF_V_ANY]], %1) : $@convention(method) (S<Array<Optional<Any>>>, TestGeneral) -> ()
117
- // CHECK: [[V_REF_ON_T:%.*]] = struct_extract %0, #TestGeneral.optV
118
- // CHECK-NEXT: [[V_ANY_ON_T:%.]] = unchecked_trivial_bit_cast [[V_REF_ON_T]] to $S<Array<Optional<Any>>>
117
+ // CHECK: [[V_REF_ON_T:%.*]] = struct_extract %0 : $TestGeneral , #TestGeneral.optV
118
+ // CHECK-NEXT: [[V_ANY_ON_T:%.]] = unchecked_trivial_bit_cast [[V_REF_ON_T]] : $S<Array<Optional<any Sendable>>> to $S<Array<Optional<Any>>>
119
119
// CHECK: [[MEMBER_REF_2:%.*]] = function_ref @$s37sendable_to_any_for_generic_arguments11TestGeneralV012accepts_opt_C0yyAA1SVySayypSgGGF : $@convention(method) (S<Array<Optional<Any>>>, TestGeneral) -> ()
120
120
// CHECK-NEXT: {{.*}} = apply [[MEMBER_REF_2]]([[V_ANY_ON_T]], %1) : $@convention(method) (S<Array<Optional<Any>>>, TestGeneral) -> ()
121
121
func test_complex_with_argument( t: TestGeneral ) {
@@ -124,8 +124,8 @@ struct TestGeneral {
124
124
}
125
125
126
126
// CHECK-LABEL: sil hidden [ossa] @$s37sendable_to_any_for_generic_arguments11TestGeneralV14test_same_typeyyF
127
- // CHECK: [[V_REF:%.*]] = struct_extract %0, #TestGeneral.v
128
- // CHECK-NEXT: [[V_ANY:%.*]] = unchecked_trivial_bit_cast [[V_REF]] to $S<Any>
127
+ // CHECK: [[V_REF:%.*]] = struct_extract %0 : $TestGeneral , #TestGeneral.v
128
+ // CHECK-NEXT: [[V_ANY:%.*]] = unchecked_trivial_bit_cast [[V_REF]] : $S<any Sendable> to $S<Any>
129
129
// CHECK: [[ANY_METATYPE:%.*]] = metatype $@thick (any Any).Type
130
130
// CHECK: [[SAME_TYPE_FN:%.*]] = function_ref @$s37sendable_to_any_for_generic_arguments11TestGeneralV8sameTypeyyAA1SVyxG_xmtlF : $@convention(method) <τ_0_0> (S<τ_0_0>, @thick τ_0_0.Type, TestGeneral) -> ()
131
131
// CHECK-NEXT: %7 = apply %6<Any>([[V_ANY]], [[ANY_METATYPE]], %0)
@@ -134,10 +134,10 @@ struct TestGeneral {
134
134
}
135
135
136
136
// CHECK-LABEL: sil hidden [ossa] @$s37sendable_to_any_for_generic_arguments11TestGeneralV18test_address_castsyyF
137
- // CHECK: [[DATA_REF:%.*]] = struct_element_addr %2, #<abstract function>Test.data
137
+ // CHECK: [[DATA_REF:%.*]] = struct_element_addr %2 : $*Test , #<abstract function>Test.data
138
138
// CHECK-NEXT: [[DATA_COPY:%.*]] = alloc_stack $V<any Sendable>
139
139
// CHECK-NEXT: copy_addr [[DATA_REF]] to [init] [[DATA_COPY]]
140
- // CHECK-NEXT: [[DATA_ANY:%.*]] = unchecked_addr_cast [[DATA_COPY]] to $*V<Any>
140
+ // CHECK-NEXT: [[DATA_ANY:%.*]] = unchecked_addr_cast [[DATA_COPY]] : $*V<any Sendable> to $*V<Any>
141
141
// CHECK: [[ACCEPTS_ANY:%.*]] = function_ref @$s37sendable_to_any_for_generic_arguments11TestGeneralV18test_address_castsyyF08accepts_C0L_yyAcDyyF1VL_VyypGF : $@convention(thin) (@in_guaranteed V<Any>) -> ()
142
142
// CHECK-NEXT: {{.*}} = apply [[ACCEPTS_ANY]]([[DATA_ANY]]) : $@convention(thin) (@in_guaranteed V<Any>) -> ()
143
143
func test_address_casts( ) {
@@ -157,11 +157,11 @@ struct TestGeneral {
157
157
}
158
158
159
159
// CHECK-LABEL: sil hidden [ossa] @$s37sendable_to_any_for_generic_arguments11TestGeneralV023test_function_types_as_E5_argsyyF
160
- // CHECK: [[FUNCV_REF:%.*]] = struct_extract %0, #TestGeneral.funcV
161
- // CHECK-NEXT: %3 = unchecked_trivial_bit_cast [[FUNCV_REF]] to $S<(Array<Any>) -> Optional<Any>>
162
- // CHECK: [[DATA_REF:%.*]] = struct_extract %20, #<abstract function>Test.data
160
+ // CHECK: [[FUNCV_REF:%.*]] = struct_extract %0 : $TestGeneral , #TestGeneral.funcV
161
+ // CHECK-NEXT: %3 = unchecked_trivial_bit_cast [[FUNCV_REF]] : $S<(Array<any Sendable>) -> Optional<any Sendable>> to $S<(Array<Any>) -> Optional<Any>>
162
+ // CHECK: [[DATA_REF:%.*]] = struct_extract %20 : $Test , #<abstract function>Test.data
163
163
// CHECK-NEXT: [[DATA_COPY:%.*]] = copy_value [[DATA_REF]]
164
- // CHECK-NEXT: [[DATA_ANY:%.*]] = unchecked_value_cast [[DATA_COPY]] to $V<(Array<Any>) -> Any>
164
+ // CHECK-NEXT: [[DATA_ANY:%.*]] = unchecked_value_cast [[DATA_COPY]] : $V<(Array<any Sendable>) -> any Sendable> to $V<(Array<Any>) -> Any>
165
165
// CHECK: [[ACCEPTS_ANY:%.*]] = function_ref @$s37sendable_to_any_for_generic_arguments11TestGeneralV023test_function_types_as_E5_argsyyF08accepts_C0L_yyAcDyyF1VL_VyypSayypGcGF : $@convention(thin) (@guaranteed V<(Array<Any>) -> Any>) -> ()
166
166
// CHECK-NEXT: {{.*}} = apply [[ACCEPTS_ANY]]([[DATA_ANY]]) : $@convention(thin) (@guaranteed V<(Array<Any>) -> Any>) -> ()
167
167
func test_function_types_as_generic_args( ) {
0 commit comments