Closed
Description
What version of CUE are you using (cue version
)?
80f4f236e29369a1f9fb4267644c8d29e7f97baa
What on earth did you do?
exec cue export o.cue
cmp stdout out.cue
-- o.cue --
import "list"
people: [
{name: "bob"},
{name: "alice"},
{name: "john"}
]
people: [...{name!: _}] & list.MaxItems(len(_uniqueNames))
_uniqueNames: {
for person in people { "\(person.name)": _ }
}
-- out.cue --
{
"people": [
{
"name": "bob"
},
{
"name": "alice"
},
{
"name": "john"
}
]
}
What's the story cowboy?
Well this works with evalv2. But with v3, I get _uniqueNames: cannot range over people (incomplete type _):