Skip to content

Commit 2507a31

Browse files
committed
[Test] Add a slow type checker test case from source compatibility suite.
1 parent 12dce85 commit 2507a31

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %target-typecheck-verify-swift -swift-version 5 -solver-expression-time-threshold=1
2+
3+
func method(_ arg: String, body: () -> [String]) {}
4+
5+
func test(str: String, properties: [String]) {
6+
// expected-error@+1 {{the compiler is unable to type-check this expression in reasonable time}}
7+
method(str + "" + str + "") {
8+
properties.map { param in
9+
"" + param + "" + param + ""
10+
} + [""]
11+
}
12+
}

0 commit comments

Comments
 (0)