cue icon indicating copy to clipboard operation
cue copied to clipboard

evaluator: panic with structurally recursive disjunction

Open cuematthew opened this issue 1 year ago • 2 comments

What version of CUE are you using (cue version)?

bb24c7ce1f048a01cba5ae7dcfe0813e127cfd42

What did you do?

env CUE_EXPERIMENT=evalv3
exec cue export ./foo.cue
-- foo.cue --
r: L=L.a
d: a: a: a: {b: 4}|d
out: r&d

What did you expect to see?

evalv2 gives

out.a.a: incomplete value {a:{b:4},b:4} | {a:{a:{a:{b:4} | {a:{a:{a:{b:4}}}}},b:4}}
r: cycle error referencing a:
    ./foo.cue:1:8

which seems right.

What did you see instead?

panic.

cuematthew avatar Sep 04 '24 15:09 cuematthew

FTR: a simplified reproducer:

d: d.a
d: a: a: 2|1

and

a
a: a: 2|1

Also related

b: a
b: (1|2) | 2
a: 1 | 2

mpvl avatar Oct 14 '24 16:10 mpvl

BTW, why do you think this should be a cycle error?

mpvl avatar Oct 19 '24 12:10 mpvl