mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add regression test to resolve #43068
This commit is contained in:
@@ -1552,6 +1552,7 @@ mirrors.test("CustomMirrorIsInherited") {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
protocol SomeNativeProto {}
|
||||
protocol SomeOtherNativeProto {}
|
||||
extension Int: SomeNativeProto {}
|
||||
|
||||
class SomeClass {}
|
||||
@@ -1586,6 +1587,14 @@ mirrors.test("MetatypeMirror") {
|
||||
output = ""
|
||||
dump(nativeProtocolConcreteMetatype, to: &output)
|
||||
expectEqual(expectedNativeProtocolConcrete, output)
|
||||
|
||||
let nativeProtocolCompositionMetatype =
|
||||
(SomeNativeProto & SomeOtherNativeProto).self
|
||||
output = ""
|
||||
dump(nativeProtocolCompositionMetatype, to: &output)
|
||||
expectEqual(
|
||||
"- Mirror.SomeNativeProto & Mirror.SomeOtherNativeProto #0\n",
|
||||
output)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user