Skip to content

Commit 6b0933a

Browse files
[tests] Add regression test for SR-15179
1 parent ac92f4e commit 6b0933a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/Constraints/function.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,8 @@ func testInvalidTupleImplosions() {
263263
func takesInout(_ x: Int, _ y: inout String) {}
264264
tuplify(takesInout) // expected-error {{cannot convert value of type '(Int, inout String) -> ()' to expected argument type '(Int) -> Void'}}
265265
}
266+
267+
// SR-15179
268+
func SR15179<Ts>(_ fn: @escaping (Ts) -> Void) {}
269+
func fn(_ x: inout Int, _ y: inout Int) {}
270+
SR15179(fn) // expected-error{{cannot convert value of type '(inout Int, inout Int) -> ()' to expected argument type '(Int) -> Void'}}

0 commit comments

Comments
 (0)