You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest stable release?
Yes
What did you do?
exec go mod tidy
exec go run .
-- go.mod --
module test
require cuelang.org/go v0.10.0
-- main.go --
package main
import (
"log"
"cuelang.org/go/cue"
)
func main() {
p := cue.MakePath(cue.Index(2))
if err := p.Err(); err != nil {
log.Fatal(err)
}
q := cue.ParsePath(p.String())
if err := q.Err(); err != nil {
log.Fatalf("cannot round-trip path %q: %v", p.String(), err)
}
}
What did you expect to see?
A passing test: an index is a perfectly valid thing to have as the first element of a path.
What did you see instead?
> exec go mod tidy
> exec go run .
[stderr]
main.go:16: cannot round-trip path "[2]": invalid label [2]
exit status 1
[exit status 1]
FAIL: /tmp/y.txtar:2: unexpected command failure
The text was updated successfully, but these errors were encountered:
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes
What did you do?
What did you expect to see?
A passing test: an index is a perfectly valid thing to have as the first element of a path.
What did you see instead?
The text was updated successfully, but these errors were encountered: