Files
swift-mirror/test/Constraints/invalid_logicvalue_coercion.swift

10 lines
246 B
Swift

// RUN: %target-parse-verify-swift
class C {}
var c = C()
if c as C { // expected-error{{type 'C' does not conform to protocol 'Boolean'}}
}
if ({1} as () -> Int) { // expected-error{{type '() -> Int' does not conform to protocol 'Boolean'}}
}