# Tests that optional nested fields within a definition unified with an open struct
# (#Root: {...}) correctly accept concrete values without "field not allowed" errors.
# https://cuelang.org/issue/483
-- in.cue --
out: {
	instance
} @test(eq, {alpha: bravo: charlie: true})

instance: #Type & {
	alpha: bravo: charlie: true
} @test(eq, {alpha: bravo: charlie: true})

#Type: #Root & {
	alpha?: bravo?: charlie?: bool
}
#Root: {...}
-- out/eval/stats --
Leaks:  0
Freed:  14
Reused: 6
Allocs: 8
Retain: 0

Unifications: 14
Conjuncts:    32
Disjuncts:    0

NumCloseIDs: 8
