You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Issue found by https://github.com/jvasileff (John Vasileff)
// This bug is NOT triggered when compiling with -O.
protocol BooleanProtocol {
var boolValue: Bool { get }
}
extension Bool : BooleanProtocol {
var boolValue: Bool { return self }
}
func f<T : BooleanProtocol>(_ b: T) {
}
f(true as BooleanProtocol) // expected-error {{protocol type 'BooleanProtocol' cannot conform to 'BooleanProtocol' because only concrete types can conform to protocols}}