Skip to content

Commit ad7f9a7

Browse files
authored
Merge pull request #40844 from xedin/add-perf-test
[TypeChecker] NFC: Add a slow perf test related to operator `>=`
2 parents 3b144fe + 3b381f7 commit ad7f9a7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
2+
// REQUIRES: tools-release,no_asan
3+
4+
// TODO(performance): This should be converted in a scale test once performance issue is fixed
5+
func test(bytes: Int, length: UInt32) {
6+
// left-hand side of `>=` is `Int` and right-hand side is a chain of `UInt32` inferred from `length`
7+
_ = bytes >= 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + length
8+
// expected-error@-1 {{reasonable time}}
9+
}

0 commit comments

Comments
 (0)