Files
swift-mirror/validation-test/stdlib/AssertDiagnostics.swift
Dmitri Hrybenko 9257f00d27 Update validation tests for compiler changes
Swift SVN r24633
2015-01-22 06:03:46 +00:00

8 lines
565 B
Swift

// RUN: %target-parse-verify-swift
func rejectsStringLiteral() {
assert("foo") // expected-error {{cannot invoke 'assert' with an argument list of type '(String)'}} expected-note {{expected an argument list of type '(@autoclosure () -> Bool, @autoclosure () -> String, file: StaticString, line: UWord)'}}
precondition("foo") // expected-error {{cannot invoke 'precondition' with an argument list of type '(String)'}} expected-note {{expected an argument list of type '(@autoclosure () -> Bool, @autoclosure () -> String, file: StaticString, line: UWord)'}}
}