@@ -28,14 +28,16 @@ func bar(x: Int) -> String { return "test" }
2828@section ( " mysection " ) let funcRef1 = foo // ok
2929@section ( " mysection " ) let funcRef2 = bar // ok
3030
31- struct S : Hashable , Sendable { }
31+ protocol P1 { }
32+ protocol P2 { }
33+ struct S : Hashable , Sendable , P1 , P2 { }
3234
3335// metatypes
3436@section ( " mysection " ) let metatype1 = Int . self
3537@section ( " mysection " ) let metatype2 : Any . Type = Int . self
3638@section ( " mysection " ) let metatype3 : Any . Type = S . self
37- @section ( " mysection " ) let metatype4 : any ( Hashable & Sendable ) . Type = Int . self
38- @section ( " mysection " ) let metatype5 : any ( Hashable & Sendable ) . Type = S . self
39+ @section ( " mysection " ) let metatype4 : any ( P1 ) . Type = S . self
40+ @section ( " mysection " ) let metatype5 : any ( P1 & P2 ) . Type = S . self
3941
4042// tuples
4143@section ( " mysection " ) let tuple1 = ( 1 , 2 , 3 , 2.718 , true ) // ok
@@ -65,8 +67,8 @@ struct S: Hashable, Sendable {}
6567
6668// CHECK: @"$s9SectionIR9metatype2ypXpvp" = {{.*}}constant ptr @"$sSiN", section "mysection"
6769// CHECK: @"$s9SectionIR9metatype3ypXpvp" = {{.*}}constant ptr getelementptr inbounds (<{ ptr, ptr, {{i64|i32}}, ptr }>, ptr @"$s9SectionIR1SVMf", i32 0, i32 2), section "mysection"
68- // CHECK: @"$s9SectionIR9metatype4SH_s8SendablepXpvp " = {{.*}}constant <{ ptr, ptr }> <{ ptr @"$sSiN ", ptr @"$sSiSHsWP " }>, section "mysection"
69- // CHECK: @"$s9SectionIR9metatype5SH_s8SendablepXpvp " = {{.*}}constant <{ ptr, ptr }> <{ ptr getelementptr inbounds (<{ ptr, ptr, {{i64|i32}}, ptr }>, ptr @"$s9SectionIR1SVMf", i32 0, i32 2), ptr @"$s9SectionIR1SVSHAAWP " }>, section "mysection"
70+ // CHECK: @"$s9SectionIR9metatype4AA2P1_pXpvp " = {{.*}}constant <{ ptr, ptr }> <{ ptr getelementptr inbounds (<{ ptr, ptr, {{i64|i32}}, ptr }>, ptr @"$s9SectionIR1SVMf ", i32 0, i32 2), ptr @"$s9SectionIR1SVAA2P1AAWP " }>, section "mysection"
71+ // CHECK: @"$s9SectionIR9metatype5AA2P1_AA2P2pXpvp " = {{.*}}constant <{ ptr, ptr, ptr }> <{ ptr getelementptr inbounds (<{ ptr, ptr, {{i64|i32}}, ptr }>, ptr @"$s9SectionIR1SVMf", i32 0, i32 2), ptr @"$s9SectionIR1SVAA2P1AAWP", ptr @"$s9SectionIR1SVAA2P2AAWP " }>, section "mysection"
7072
7173// CHECK: @"$s9SectionIR6tuple1Si_S2iSdSbtvp" = {{.*}}constant <{ %TSi, %TSi, %TSi, {{.*}} }> <{ %TSi <{ {{i64|i32}} 1 }>, %TSi <{ {{i64|i32}} 2 }>, %TSi <{ {{i64|i32}} 3 }>, {{.*}} }>, section "mysection"
7274// CHECK: @"$s9SectionIR6tuple2Si_SfSbtvp" = {{.*}}constant <{ %TSi, %TSf, %TSb }> <{ %TSi <{ {{i64|i32}} 42 }>, %TSf <{ float 0x40091EB860000000 }>, %TSb zeroinitializer }>, section "mysection"
0 commit comments