Skip to content

Commit c1f43c8

Browse files
[tests] [SR-12483] Adding regression tests
1 parent ae93790 commit c1f43c8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/Constraints/closures.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,3 +1097,11 @@ struct R_76250381<Result, Failure: Error> {
10971097
return false
10981098
}
10991099
}
1100+
1101+
// SR-13483
1102+
(0..<10).map { x, y in }
1103+
// expected-error@-1 {{contextual closure type '((Range<Int>).Element) throws -> ()' expects 1 argument, but 2 were used in closure body}}
1104+
(0..<10).map { x, y, z in }
1105+
// expected-error@-1 {{contextual closure type '((Range<Int>).Element) throws -> ()' expects 1 argument, but 3 were used in closure body}}
1106+
(0..<10).map { x, y, z, w in }
1107+
// expected-error@-1 {{contextual closure type '((Range<Int>).Element) throws -> ()' expects 1 argument, but 4 were used in closure body}}

0 commit comments

Comments
 (0)