Skip to content

Commit

Permalink
internal/core/adt: add test to prepare for fix
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
mpvl committed Dec 1, 2023
1 parent 16a0cda commit 145764d
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions cue/testdata/comprehensions/issue293.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,22 @@ t: #C
}
}
t: p: "foo"

-- variant1.cue --
#V1: {
x: close({ f1: int })
x: f2: 2 // TODO: fail
}
-- out/eval/stats --
Leaks: 2
Freed: 12
Reused: 8
Allocs: 6
Retain: 3
Leaks: 3
Freed: 16
Reused: 12
Allocs: 7
Retain: 4

Unifications: 14
Conjuncts: 25
Disjuncts: 15
Unifications: 19
Conjuncts: 33
Disjuncts: 20
-- out/eval --
Errors:
z.x.f2: field not allowed:
Expand Down Expand Up @@ -70,6 +76,12 @@ Result:
#C: (#struct){
p: (_){ _ }
}
#V1: (#struct){
x: (#struct){
f1: (int){ int }
f2: (int){ 2 }
}
}
}
-- out/compile --
--- in.cue
Expand Down Expand Up @@ -98,3 +110,14 @@ Result:
p: "foo"
}
}
--- variant1.cue
{
#V1: {
x: close({
f1: int
})
x: {
f2: 2
}
}
}

0 comments on commit 145764d

Please sign in to comment.