cuelang / cue

CUE has moved to https://github.com/cue-lang/cue
https://cuelang.org
Apache License 2.0
3.09k stars 171 forks source link

Reference set to unknown node in AST (`for a in a`) #946

Closed q3k closed 3 years ago

q3k commented 3 years ago

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

$ git rev-parse HEAD
a31dd01670b9e63728a1e1c62148a9770c1d6382
$ go build -o cue.elf cuelang.org/go/cmd/cue
$ ./cue.elf version
cue version (devel) linux/amd64

Does this issue reproduce with the latest release?

Yes, tested against 0.3.2.

What did you do?

cue eval

-- bar.cue --
package repro

a: []
-- foo.cue --
package repro

{for a in a {}}

What did you expect to see?

$ cue eval
a: []

And this does indeed happen if I do one of the following:

What did you see instead?

$ cue eval
reference "a" set to unknown node in AST; this can result from incorrect API usage or a compiler bug:
    ./foo.cue:3:11
cueckoo commented 3 years ago

This issue has been migrated to https://github.com/cue-lang/cue/issues/946.

For more details about CUE's migration to a new home, please see https://github.com/cue-lang/cue/issues/1078.