We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8d73b7 commit 5e615d6Copy full SHA for 5e615d6
test/Constraints/argument_matching.swift
@@ -1789,3 +1789,16 @@ func rdar93922410(_ completion: (Int?) -> Void) { // expected-note {{'completion
1789
return completion() // expected-error {{missing argument for parameter #1 in call}}
1790
}
1791
1792
+
1793
+// https://github.com/apple/swift/issues/43509
1794
+do {
1795
+ func myAssertionFailure(
1796
+ _ message: @autoclosure () -> String = String(),
1797
+ file: StaticString = #file, line: UInt = #line
1798
+ ) {}
1799
1800
+ let x: Int?
1801
+ myAssertionFailure(x != nil, "error")
1802
+ // expected-error@-1 {{cannot convert value of type 'Bool' to expected argument type 'String'}}
1803
+ // expected-error@-2 {{missing argument label 'file:' in call}}
1804
+}
0 commit comments