#name: delayed constraint failure
#evalPartial
# Tests that cycles resolved by defaults produce correct values, while
# conflicting constraints on the same field produce errors.
-- in.cue --
a: b - 100 @test(eq, 100) // Okay to have no error here, as long as there is an error with b.
b: a + 110
b: 200 @test(err, code=eval, pos=[-1:4, 0:4])

x: 100
x: x + 1 @test(err, code=eval, pos=[-1:4, 0:4])
-- out/errors.txt --
[eval] b: conflicting values 210 and 200:
    ./in.cue:2:4
    ./in.cue:3:4
[eval] x: conflicting values 101 and 100:
    ./in.cue:5:4
    ./in.cue:6:4
-- out/eval/stats --
Leaks:  0
Freed:  4
Reused: 0
Allocs: 4
Retain: 0

Unifications: 4
Conjuncts:    6
Disjuncts:    0
