Skip to content

Commit ff8663f

Browse files
committed
[Tests] NFC: Update a couple of type-checker tests
1 parent 28396a6 commit ff8663f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

validation-test/Sema/type_checker_perf/slow/nil_coalescing.swift.gyb renamed to validation-test/Sema/type_checker_perf/fast/nil_coalescing.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %scale-test --invert-result --begin 1 --end 5 --step 1 --select NumLeafScopes %s
1+
// RUN: %scale-test --begin 1 --end 10 --step 1 --select NumLeafScopes %s
22
// REQUIRES: asserts,no_asan
33

44
func t(_ x: Int?) -> Int {

validation-test/Sema/type_checker_perf/fast/borderline_flat_map_operator_mix.swift renamed to validation-test/Sema/type_checker_perf/slow/borderline_flat_map_operator_mix.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=10
1+
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
22

33
// REQUIRES: no_asan
44

@@ -10,8 +10,11 @@ struct S {
1010
}
1111
}
1212

13+
// Note: One possible approach to this issue would be to determine when the array literal inside of the inner closure
14+
// doesn't have any other possible bindings but Array and attempt it at that point. That would fail overload of flatMap
15+
// that returns an optional value.
1316
func f(x: Array<S>, y: Range<Int>) -> [S] {
14-
return x.flatMap { z in
17+
return x.flatMap { z in // expected-error {{the compiler is unable to type-check this expression in reasonable time}}
1518
return ((y.lowerBound / 1)...(y.upperBound + 1) / 1).flatMap { w in
1619
return [S(1 * Double(w) + 1.0 + z.t),
1720
S(1 * Double(w) + 1.0 - z.t)]

0 commit comments

Comments
 (0)