Skip to content

Commit e4f0f78

Browse files
Add minimal test case for rdar://problem/54580427.
The scale test says the behavior is exponential, but it should be linear, given that (1) we provide a contextual type outside and (2) there is precisely 1 type which has the corresponding cases.
1 parent 8fcc94f commit e4f0f78

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// FIXME: This should be linear instead of exponential.
2+
// RUN: %scale-test --begin 1 --end 10 --step 1 --select NumLeafScopes --invert-result %s
3+
// REQUIRES: OS=macosx
4+
// REQUIRES: asserts
5+
6+
enum Val {
7+
case d([String: Val])
8+
case f(Double)
9+
}
10+
11+
struct X {
12+
var x : Float
13+
}
14+
15+
extension X {
16+
func val() -> Val {
17+
return Val.d([
18+
%for i in range(0, N):
19+
"x": .f(Double(x)),
20+
%end
21+
])
22+
}
23+
}

0 commit comments

Comments
 (0)