Skip to content

Commit f9b76b8

Browse files
committed
Add regression test to resolve #43068
1 parent 74ee6b5 commit f9b76b8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/stdlib/Mirror.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,6 +1552,7 @@ mirrors.test("CustomMirrorIsInherited") {
15521552
//===----------------------------------------------------------------------===//
15531553

15541554
protocol SomeNativeProto {}
1555+
protocol SomeOtherNativeProto {}
15551556
extension Int: SomeNativeProto {}
15561557

15571558
class SomeClass {}
@@ -1586,6 +1587,14 @@ mirrors.test("MetatypeMirror") {
15861587
output = ""
15871588
dump(nativeProtocolConcreteMetatype, to: &output)
15881589
expectEqual(expectedNativeProtocolConcrete, output)
1590+
1591+
let nativeProtocolCompositionMetatype =
1592+
(SomeNativeProto & SomeOtherNativeProto).self
1593+
output = ""
1594+
dump(nativeProtocolCompositionMetatype, to: &output)
1595+
expectEqual(
1596+
"- Mirror.SomeNativeProto & Mirror.SomeOtherNativeProto #0\n",
1597+
output)
15891598
}
15901599
}
15911600

0 commit comments

Comments
 (0)