Avatar
omochimetaru 5/30/2022 8:53 AM
@swift-main -Xfrontend -enable-experimental-named-opaque-types -Xfrontend -enable-parameterized-protocol-types public protocol P<A> { associatedtype A } struct S1<A>: P {} struct S2<A>: P {} public func makeP() -> <T: P, U: P> (T, U) { return (S1<Int>(), S2<Int>()) } public func useSame<T>(_ a: T, _ b: T) {} func main() { let pair = makeP() useSame(type(of: pair.0).A.self, type(of: pair.1).A.self) }