blob: 8fdfc45447922ebc6937d1ed0ab7be03a8a27429 [file] [log] [blame]
// RUN: %target-swift-frontend %s -emit-ir
public protocol Proto {
associatedtype One
associatedtype Two
static func bar<T>(elm: One, t: T) -> T
}
struct S<P: Proto> {
let x: P.Two
func foo<T>(_ t: T) -> T where P.Two == P.One {
let x: P.Two = self.x
let elm: P.One = x as! P.One
return P.bar(elm: elm, t: t)
}
}