cue icon indicating copy to clipboard operation
cue copied to clipboard

@embed does not accept quoted identifier

Open nxcc opened this issue 4 months ago • 1 comments

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

$ cue version
cue version v0.10.0

go version go1.23.0
      -buildmode exe
       -compiler gc
       -trimpath true
     CGO_ENABLED 0
          GOARCH amd64
            GOOS linux
         GOAMD64 v1
cue.lang.version v0.10.0

Does this issue reproduce with the latest stable release?

yes (but it's an experimental feature)

What did you do?

env CUE_EXPERIMENT=embed
exec cue -e a.b eval
cmp stdout golden

-- a.cue --
@extern(embed)

package example

a: "b": _ @embed(file=c.txt)

-- c.txt --
c

-- golden --
"""
    c


    """

(test.testscript.txt)

What did you expect to see?

PASS

What did you see instead?

can only define functions for fields with identifier names, found "b"

nxcc avatar Oct 16 '24 11:10 nxcc