Skip to content

Commit

Permalink
[Test] Add a slow type checker test case from source compatibility su…
Browse files Browse the repository at this point in the history
…ite.
  • Loading branch information
hborla committed Nov 5, 2020
1 parent 12dce85 commit 2507a31
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// RUN: %target-typecheck-verify-swift -swift-version 5 -solver-expression-time-threshold=1

func method(_ arg: String, body: () -> [String]) {}

func test(str: String, properties: [String]) {
// expected-error@+1 {{the compiler is unable to type-check this expression in reasonable time}}
method(str + "" + str + "") {
properties.map { param in
"" + param + "" + param + ""
} + [""]
}
}

0 comments on commit 2507a31

Please sign in to comment.