mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
8 lines
565 B
Swift
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)'}}
|
|
}
|
|
|