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

eval: matchN unexpected success with required field #3651

Closed
rogpeppe opened this issue Jan 3, 2025 · 1 comment
Closed

eval: matchN unexpected success with required field #3651

rogpeppe opened this issue Jan 3, 2025 · 1 comment
Labels
evaluator evalv3 issues affecting only the evaluator version 3 NeedsFix

Comments

@rogpeppe
Copy link
Member

rogpeppe commented Jan 3, 2025

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

3f4e72d4d1712d61bfa0cbc0660875e1461d18f6

Does this issue reproduce with the latest stable release?

Yes (v0.11.1)

What did you do?

env CUE_EXPERIMENT=evalv3
! exec cue vet -c x.cue

-- x.cue --
data: {} & #s
#s: matchN(1, [matchN(1, [{a!: _}])])

What did you expect to see?

A passing test. The empty struct does not contain the required field a.

What did you see instead?

> env CUE_EXPERIMENT=evalv3
> ! exec cue vet -c x.cue
FAIL: y.txtar:2: unexpected command success
@myitcv myitcv added evaluator evalv3 issues affecting only the evaluator version 3 NeedsInvestigation and removed NeedsInvestigation labels Jan 3, 2025
@myitcv
Copy link
Member

myitcv commented Jan 9, 2025

Possibly related: #3668

cueckoo pushed a commit that referenced this issue Jan 10, 2025
Issue #3651

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: I0f2755389bc954828dbc11d4dd53fd4b5eb72c17
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1206949
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluator evalv3 issues affecting only the evaluator version 3 NeedsFix
Projects
None yet
Development

No branches or pull requests

2 participants