Files
swift-mirror/test/Constraints/invalid_logicvalue_coercion.swift
David Farler b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00

10 lines
220 B
Swift

// RUN: %target-typecheck-verify-swift
class C {}
var c = C()
if c as C { // expected-error{{'C' is not convertible to 'Bool'}}
}
if ({1} as () -> Int) { // expected-error{{'() -> Int' is not convertible to 'Bool'}}
}