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
$ cue version
cue version v0.0.0-20240507175810-9efad9041981
go version go1.22.1
-buildmode exe
-compiler gc
DefaultGODEBUG httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1
CGO_ENABLED 1
GOARCH arm64
GOOS linux
vcs git
vcs.revision 9efad90419811c9a27682857ffdc9324cdb7e094
vcs.time 2024-05-07T17:58:10Z
vcs.modified false
cue.lang.version v0.9.0
Does this issue reproduce with the latest release?
Yes
What did you do?
# old evaluator
env CUE_EXPERIMENT=''
exec cue export x.cue
cmp stdout stdout.golden
# new evaluator
env CUE_EXPERIMENT='evalv3'
exec cue export x.cue
cmp stdout stdout.golden
-- x.cue --
import "math/bits"
x: [...bool]
x: [true, false, true, true]
y: [for _, v in x {[if v {1}, 0][0]}]
z: [for i, v in y {bits.Set(*z[i-1] | 0, len(y)-i-1, v)}][3]
-- stdout.golden --
{
"x": [
true,
false,
true,
true
],
"y": [
1,
0,
1,
1
],
"z": 1
}
What did you expect to see?
Passing test.
What did you see instead?
# old evaluator (0.012s)
# new evaluator (0.011s)
> env CUE_EXPERIMENT='evalv3'
> exec cue export x.cue
[stderr]
z: error in call to math/bits.Set: non-concrete value _:
./x.cue:6:20
[exit status 1]
FAIL: /tmp/testscript820382168/repro.txtar/script.txtar:8: unexpected command failure
Note that it is understood that the reference in the declaration of z to *z[i-1] | 0 is "wrong" by virtue of the result of z being a scalar value (contrast https://cuelang.org/play/?id=MSdriK7Ernf#w=function&i=cue&f=eval&o=cue) but reporting this actual error for completeness' sake.
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 release?
Yes
What did you do?
What did you expect to see?
Passing test.
What did you see instead?
Note that it is understood that the reference in the declaration of
z
to*z[i-1] | 0
is "wrong" by virtue of the result ofz
being a scalar value (contrast https://cuelang.org/play/?id=MSdriK7Ernf#w=function&i=cue&f=eval&o=cue) but reporting this actual error for completeness' sake.The text was updated successfully, but these errors were encountered: