File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
validation-test/Sema/type_checker_perf Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 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
2
2
// REQUIRES: asserts,no_asan
3
3
4
4
func t(_ x: Int?) -> Int {
Original file line number Diff line number Diff line change 1
- // RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=10
1
+ // RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
2
2
3
3
// REQUIRES: no_asan
4
4
@@ -10,8 +10,11 @@ struct S {
10
10
}
11
11
}
12
12
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.
13
16
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}}
15
18
return ( ( y. lowerBound / 1 ) ... ( y. upperBound + 1 ) / 1 ) . flatMap { w in
16
19
return [ S ( 1 * Double( w) + 1.0 + z. t) ,
17
20
S ( 1 * Double( w) + 1.0 - z. t) ]
You can’t perform that action at this time.
0 commit comments