Skip to content

Commit 66de9e3

Browse files
committed
[NFC] Add a slow type checker test involving string concatenation.
1 parent 0d1e7ab commit 66de9e3

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 -solver-expression-time-threshold=1
2+
// REQUIRES: tools-release,no_asan
3+
4+
struct Value {
5+
let debugDescription: String
6+
}
7+
8+
func test(values: [[Value]]) -> String {
9+
// expected-error@+1 {{the compiler is unable to type-check this expression in reasonable time}}
10+
"[" + "" + values.map({ "[" + $0.map({ $0.debugDescription }).joined(separator: ", ") + "]" }).joined(separator: ", ") + "]"
11+
}
12+

0 commit comments

Comments
 (0)