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 8fe1e3c commit 12c8630Copy full SHA for 12c8630
test/Constraints/argument_matching.swift
@@ -1623,3 +1623,18 @@ func sr13135() {
1623
1624
foo(Foo().bar, [baz])
1625
}
1626
+
1627
+// SR-13240
1628
+func twoargs(_ x: String, _ y: String) {}
1629
1630
+func test() {
1631
+ let x = 1
1632
+ twoargs(x, x) // expected-error 2 {{cannot convert value of type 'Int' to expected argument type 'String'}}
1633
+}
1634
1635
+infix operator ---
1636
1637
+func --- (_ lhs: String, _ rhs: String) -> Bool { true }
1638
1639
+let x = 1
1640
+x --- x // expected-error 2 {{cannot convert value of type 'Int' to expected argument type 'String'}}
0 commit comments