blob: 7f8e63eef83cbbce8ca1ca24c0aa9aa4a6132d74 [file] [log] [blame]
// RUN: not %target-swift-frontend %s -typecheck
public protocol I {
associatedtype X : Equatable
}
protocol C : I {
}
protocol A : class {
func u<T : Comparable>() -> T?
}
final class B<S : C> {
func u(_ p: A) -> S.X {
if let i = p.u() as S.X? {
return i
}
fatalError("nope")
}
}