-- in.cue --
a: {b: int}   @test(eq, {b: int})
c: a & {
	b: 100
	d: a.b + 3 // do not resolve as c != a.
} @test(eq, {b: 100, d: _|_ @test(err,
	code=incomplete, contains="non-concrete value int in operand to +", pos=[2:5, -1:8])})
x: {
	b: int
	c: b + 5   @test(err, code=incomplete, contains="non-concrete value int in operand to +", pos=[0:5, -1:5])
	@test(eq, {b: int, c: _|_})
}
y: x & {b: 100}   @test(eq, {b: 100, c: 105}) // c should resolve to 105
v: {
	b: int
	c: v.b + 5   @test(err, code=incomplete, contains="non-concrete value int in operand to +", pos=[0:5, -1:5]) // reference starting from copied node.
	@test(eq, {b: int, c: _|_})
}
w:  v & {b: 100}   @test(eq, {b: 100, c: _|_})
wp: v & {b: 100}   @test(eq, {b: 100, c: _|_})
-- out/errors.txt --
[incomplete] c.d: non-concrete value int in operand to +:
    ./in.cue:4:5
    ./in.cue:1:8
[incomplete] x.c: non-concrete value int in operand to +:
    ./in.cue:9:5
    ./in.cue:8:5
[incomplete] v.c: non-concrete value int in operand to +:
    ./in.cue:15:5
    ./in.cue:14:5
[incomplete] w.c: non-concrete value int in operand to +:
    ./in.cue:15:5
    ./in.cue:14:5
[incomplete] wp.c: non-concrete value int in operand to +:
    ./in.cue:15:5
    ./in.cue:14:5
-- out/eval/stats --
Leaks:  0
Freed:  21
Reused: 11
Allocs: 10
Retain: 0

Unifications: 21
Conjuncts:    33
Disjuncts:    0

NumCloseIDs: 4
