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
22// REQUIRES: asserts,no_asan
33
44func 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
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.
1316func 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) ]
You can’t perform that action at this time.
0 commit comments