Skip to content

Commit 7796f53

Browse files
committed
[TypeChecker] NFC: Add a "slow" perf test-case for rdar://91310777
(cherry picked from commit 7869b73)
1 parent 736863b commit 7796f53

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
2+
// REQUIRES: tools-release,no_asan
3+
4+
func compute(_ cont: () -> Void) {}
5+
6+
func test() {
7+
compute {
8+
let x = 42
9+
compute {
10+
print(x)
11+
let v: UInt64 = UInt64((24 / UInt32(1)) + UInt32(0) - UInt32(0) - 24 / 42 - 42)
12+
// expected-error@-1 {{the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions}}
13+
print(v)
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)