// RUN: %target-swift-remoteast-test %s | %FileCheck %s // REQUIRES: swift-remoteast-test @_silgen_name("printMetadataType") func printType(_: Any.Type) @_silgen_name("stopRemoteAST") func stopRemoteAST() extension Int { struct Inner { } } // CHECK: Int.Inner printType(Int.Inner.self) extension Int.Inner { struct MoreInner { } } // CHECK: Int.Inner.MoreInner printType(Int.Inner.MoreInner.self) protocol P { associatedtype Assoc } struct A { } extension Int: P { typealias Assoc = Double } extension String: P { typealias Assoc = Double } extension A where T.Assoc == U.Assoc { struct ViaSameType { } } // CHECK: A.ViaSameType printType(A.ViaSameType.self) protocol Q { } extension Int: Q { } extension A where T: Q { struct ViaProtocolConformance { } } // CHECK: A.ViaProtocolConformance printType(A.ViaProtocolConformance.self) class B { } class C: B { } extension B: P { typealias Assoc = Int } extension A where U: B { struct ViaBaseClass { } } // CHECK: A.ViaBaseClass printType(A.ViaBaseClass.self) // CHECK: A.ViaBaseClass printType(A.ViaBaseClass.self) extension A where T: AnyObject { struct ViaAnyObject { func wobble() {} } } // CHECK: A.ViaAnyObject printType(A.ViaAnyObject.self) stopRemoteAST()