# A field behind an `if false` comprehension was unexpectedly inserted when
# another `if true` comprehension defined the same field with a pattern
# constraint that referenced a hidden field by name.
# https://cuelang.org/issue/4174
-- in.cue --
if true {
	a: [_]: {
		_embed
	}
	_embed: {}
}

if false {
	a: neverAdded: {}
}

a: _ @test(eq, {})
-- out/eval/stats --
Leaks:  1
Freed:  3
Reused: 0
Allocs: 4
Retain: 0

Unifications: 4
Conjuncts:    5
Disjuncts:    0

NumCloseIDs: 2
