blob: 81cf130057618021c743257aa0e22e520d309673 [file] [log] [blame]
// RUN: %target-typecheck-verify-swift -swift-version 4
// Ensure that we do not select the unavailable failable init as the
// only solution and then fail to typecheck.
protocol P {}
class C : P {
@available(swift, obsoleted: 4)
public init?(_ c: C) {
}
public init<T : P>(_ c: T) {}
}
func f(c: C) {
let _: C? = C(c)
}