// RUN: %target-swift-frontend -emit-silgen -parse-stdlib %s protocol P { typealias Assoc } protocol Q { typealias Assoc1 typealias Assoc2 } struct G {} class C {} func a(x: T) {} func b(x: G, y: T.Assoc) {} func c(x: T, y: T.Assoc) {} func d>(x: T, y: U) {} func e(x: T, y: U) {} // FIXME: Same-type constraints expose a typechecker bug. // func f(x: T) {} func g(x: T) {} func h(x: T) {} func i(x: T) {} func j(_: T) {} func k(_: T) {} func l(_: T) {} func m(_: T) {} struct Foo { func z() {} func a(x: T) {} func b(x: G, y: T.Assoc) {} func c(x: T, y: T.Assoc) {} func d>(x: T, y: U) {} func e(x: T, y: U) {} func f(x: T) {} func g(x: T) {} func h(x: T) {} func i(x: T) {} func j(_: T) {} func k(_: T) {} func l(_: T) {} func m(_: T) {} } // Test that we handle interface type lowering when accessing a dependent // member of a dependent member that substitutes to a type parameter. // protocol Fooable { typealias Foo } protocol Barrable { typealias Bar: Fooable func bar(Bar) -> Bar.Foo } struct FooBar: Barrable { typealias Bar = T func bar(_ x: T) -> T.Foo { } }