blob: fe779274dcb41ed5a615a456b452678e6f3e068d [file] [log] [blame]
// RUN: %target-swift-emit-silgen -verify %s
class C<T> {
init() {}
}
extension C where T == Int {
convenience init(forInt _: ()) {
self.init()
}
}
func exerciseInits(which: Bool) -> C<Int> {
if which {
return C()
} else {
return C(forInt: ())
}
}
protocol P {
associatedtype T
}
struct S : P {
typealias T = Int
}
struct G<T : P> {}
extension G where T == S {
func foo(_: T.T) {}
}