Skip to content

evalv3 "field not allowed" regression with a disjunction and a let field #3832

@mvdan

Description

@mvdan
# With the old evaluator.
env CUE_EXPERIMENT=evalv3=0
exec cue export

# With the new evaluator.
env CUE_EXPERIMENT=evalv3=1
exec cue export

-- input.cue --
package p

_person: self: firstName: "Sam"

#T: {
	_subject: {
		in:  _
		out: {
			let self = in.self
			outFirstName: self.firstName
		}
	}
	_assert: pass: _
	_assert: {
		check!: _
		pass:   "never"
	} | {
		invoke!: _
		pass:    (_subject & {in: invoke}).out
	}
	results: _assert.pass
}
#T & {
	_assert: invoke: _person
}

As of 2c002ae:

# With the old evaluator. (0.011s)
> env CUE_EXPERIMENT=evalv3=0
> exec cue export
[stdout]
{
    "results": {
        "outFirstName": "Sam"
    }
}
# With the new evaluator. (0.025s)
> env CUE_EXPERIMENT=evalv3=1
> exec cue export
[stderr]
_assert: 2 errors in empty disjunction:
_assert.invoke: field not allowed:
    ./input.cue:24:11
_assert.pass.self.firstName: field not allowed:
    ./input.cue:3:16
[exit status 1]
FAIL: repro-evalv3.txtar:7: unexpected command failure

Metadata

Metadata

Assignees

Labels

evaluatorevalv3issues affecting only the evaluator version 3unity-winbugs found thanks to projects added to Unity

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions