Files
swift-mirror/validation-test/stdlib/AssertDiagnostics.swift
Dmitri Hrybenko 252c2ffba7 stdlib: add a regression test for assert accepting a string literal
rdar://16987306

Swift SVN r22386
2014-09-30 14:39:21 +00:00

8 lines
223 B
Swift

// RUN: %swift -verify -parse %s
func rejectsStringLiteral() {
assert("foo") // expected-error {{cannot convert the expression's type}}
precondition("foo") // expected-error {{cannot convert the expression's type}}
}