Skip to content

Commit aef70f0

Browse files
authored
Merge pull request swiftlang#39863 from hborla/complicate-type-checker-perf-test
[Test] Complicate a "fast" type checker test to make it slow.
2 parents 713f9b7 + 4fc5830 commit aef70f0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
1+
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1 -solver-disable-shrink
22
// REQUIRES: tools-release,no_asan
33
// UNSUPPORTED: swift_test_mode_optimize_none && OS=linux-gnu
44

55
func rdar26564101(a: [Double], m: Double) -> Double {
6-
return Double(Array(0...a.count - 1).reduce(0) { $0 + $1 - m })
7-
// expected-error@-1 {{cannot convert value of type}}
6+
// expected-error@+1 {{unable to type-check this expression in reasonable time}}
7+
return Double(Array(0...a.count - 1).reduce(0) {
8+
$0 + $1 - m + $0 + $1 + $0
9+
})
810
}

0 commit comments

Comments
 (0)