Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comprehension inside definition gives "field not allowed" error #1404

Closed
rogpeppe opened this issue Nov 26, 2021 · 1 comment
Closed

comprehension inside definition gives "field not allowed" error #1404

rogpeppe opened this issue Nov 26, 2021 · 1 comment

Comments

@rogpeppe
Copy link
Member

commit 9e7d4d6

This code gives rise to an error, but it should not:

#D: {
	a: foo: 123
	b: {for k, v in a {(k): v}}
}

The error is:

#D.b: field not allowed: foo:
    ./y.cue:3:5
    ./y.cue:3:6
    ./y.cue:3:20
    ./y.cue:3:21
@rogpeppe rogpeppe added NeedsInvestigation Triage Requires triage/attention labels Nov 26, 2021
@mpvl mpvl added comprehensions NeedsFix and removed NeedsInvestigation Triage Requires triage/attention labels Nov 26, 2021
@mpvl mpvl added this to the v0.4.1: bug fixes milestone Nov 26, 2021
cueckoo pushed a commit that referenced this issue Nov 26, 2021
…ions

At some point the evaluator did not necessarily return a value for
evalCache. I'm surprised no test caught this before.

Fixes #1404

Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>

Change-Id: I4c9fd7a8fa3fd3b103e0cbb85885120968460cc2
@mpvl
Copy link
Member

mpvl commented Nov 26, 2021

A silly regression with a simple fix. Fix coming up.

cueckoo pushed a commit that referenced this issue Nov 29, 2021
Fixes #1404

Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>

Change-Id: I281fd02e141f3014303881cc36b1380d5c5e2e1e
cueckoo pushed a commit that referenced this issue Nov 29, 2021
Fixes #1404
Fixes #1025

Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>

Change-Id: I281fd02e141f3014303881cc36b1380d5c5e2e1e
Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>
cueckoo pushed a commit that referenced this issue Nov 29, 2021
Fixes #1404
Fixes #1025

Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>

Change-Id: I281fd02e141f3014303881cc36b1380d5c5e2e1e
Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/528363
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
jlongtine pushed a commit to jlongtine/cue that referenced this issue Dec 8, 2021
…ions

At some point the evaluator did not necessarily return a value for
evalCache. I'm surprised no test caught this before.

Fixes cue-lang#1404

Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>

Change-Id: I4c9fd7a8fa3fd3b103e0cbb85885120968460cc2
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/528267
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
Signed-off-by: Joel Longtine <joel@longtine.io>
jlongtine pushed a commit to jlongtine/cue that referenced this issue Dec 8, 2021
Fixes cue-lang#1404
Fixes cue-lang#1025

Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>

Change-Id: I281fd02e141f3014303881cc36b1380d5c5e2e1e
Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/528363
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
Signed-off-by: Joel Longtine <joel@longtine.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants