Skip to content

Commit 145764d

Browse files
committed
internal/core/adt: add test to prepare for fix
Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I18db75a38647d7d9d2f782a3e9c11fb5ec62abec Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1172012 Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent 16a0cda commit 145764d

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

cue/testdata/comprehensions/issue293.txtar

+31-8
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,22 @@ t: #C
2424
}
2525
}
2626
t: p: "foo"
27+
28+
-- variant1.cue --
29+
#V1: {
30+
x: close({ f1: int })
31+
x: f2: 2 // TODO: fail
32+
}
2733
-- out/eval/stats --
28-
Leaks: 2
29-
Freed: 12
30-
Reused: 8
31-
Allocs: 6
32-
Retain: 3
34+
Leaks: 3
35+
Freed: 16
36+
Reused: 12
37+
Allocs: 7
38+
Retain: 4
3339

34-
Unifications: 14
35-
Conjuncts: 25
36-
Disjuncts: 15
40+
Unifications: 19
41+
Conjuncts: 33
42+
Disjuncts: 20
3743
-- out/eval --
3844
Errors:
3945
z.x.f2: field not allowed:
@@ -70,6 +76,12 @@ Result:
7076
#C: (#struct){
7177
p: (_){ _ }
7278
}
79+
#V1: (#struct){
80+
x: (#struct){
81+
f1: (int){ int }
82+
f2: (int){ 2 }
83+
}
84+
}
7385
}
7486
-- out/compile --
7587
--- in.cue
@@ -98,3 +110,14 @@ Result:
98110
p: "foo"
99111
}
100112
}
113+
--- variant1.cue
114+
{
115+
#V1: {
116+
x: close({
117+
f1: int
118+
})
119+
x: {
120+
f2: 2
121+
}
122+
}
123+
}

0 commit comments

Comments
 (0)