@@ -15,4 +15,29 @@ public struct VariadicType<T...> {
1515 // CHECK-LABEL: sil [ossa] @$s19pack_expansion_type12VariadicTypeV13takesFunction1tyqd__qd__Qp_txxQpXE_tlF : $@convention(method) <T...><U...> (@noescape @callee_guaranteed @substituted <τ_0_0..., τ_0_1..., τ_0_2..., τ_0_3...> (@in_guaranteed τ_0_0...) -> @out τ_0_2... for <T, T, U, U>, VariadicType<T...>) -> () {
1616 // CHECK: bb0(%0 : $@noescape @callee_guaranteed @substituted <τ_0_0..., τ_0_1..., τ_0_2..., τ_0_3...> (@in_guaranteed τ_0_0...) -> @out τ_0_2... for <T, T, U, U>, %1 : $VariadicType<T...>):
1717 public func takesFunction< U... > ( t: ( T . . . ) -> ( U . . . ) ) { }
18+ }
19+
20+ // CHECK-LABEL: sil hidden [ossa] @$s19pack_expansion_type17variadicMetatypesyyxxQplF : $@convention(thin) <T...> (@in_guaranteed T...) -> () {
21+ // CHECK: bb0(%0 : $*T...):
22+ // CHECK: metatype $@thin VariadicType<>.Type
23+ // CHECK: metatype $@thin VariadicType<Int>.Type
24+ // CHECK: metatype $@thin VariadicType<Int, String>.Type
25+ // CHECK: metatype $@thin VariadicType<T...>.Type
26+ // CHECK: metatype $@thin VariadicType<Int, Array<T>...>.Type
27+ // CHECK: metatype $@thin (T...).Type
28+ // CHECK: metatype $@thin (Int, Array<T>...).Type
29+ // CHECK: metatype $@thin ((T...) -> ()).Type
30+ // CHECK: metatype $@thin ((Int, Array<T>...) -> ()).Type
31+ // CHECK: return
32+
33+ func variadicMetatypes< T... > ( _: T ... ) {
34+ _ = VariadicType< > . self
35+ _ = VariadicType< Int> . self
36+ _ = VariadicType < Int , String > . self
37+ _ = VariadicType< T... > . self
38+ _ = VariadicType < Int , ( Array < T > ) . . . > . self
39+ _ = ( T... ) . self
40+ _ = ( Int, ( Array < T > ) ... ) . self
41+ _ = ( ( T... ) - > ( ) ) . self
42+ _ = ( ( Int, ( Array < T > ) ... ) - > ( ) ) . self
1843}
0 commit comments