cue icon indicating copy to clipboard operation
cue copied to clipboard

rendering {_} or _ as {}

Open cuematthew opened this issue 1 year ago • 0 comments

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

commit 8145bdd3b238d888870ec43955137121eba07e89

What did you do?

exec cue eval list.cue

-- list.cue --
a: { for _, e in [] { e } }
a: 1

What did you expect to see?

The result of the comprehension itself (list.cue line 1) is rendered as {} - i.e. empty struct. Which suggests it shouldn't unify with 1. But it seems that this value is top, and so should be rendered as _.

cuematthew avatar Jul 25 '24 14:07 cuematthew