-- in.cue --
#Foo: {
	field: int
	recursive: {
		field: string
	}

	@test(eq, {field: int, recursive: {field: string}})
	@test(closed)
}

// Allowed
#Foo1: {field: int}
#Foo1: {field2: string} @test(eq, {field: int, field2: string}) @test(closed)

foo: #Foo
foo: {feild: 2} @test(err, code=eval, contains="field not allowed", pos=[0:7])

foo1: #Foo
foo1: {
	field: 2 @test(eq, 2)
	recursive: {
		feild: 2 @test(err, code=eval, contains="field not allowed", pos=[0:3])
	}
}

#Bar: {
	field: int
	{[A=_]: int}

	@test(eq, {field: int, [_]: int})
	@test(closed)
}
bar: #Bar
bar: {feild: 2} @test(eq, {feild: 2, field: int})

#Mixed: string
Mixed:  string

mixedRec: {#Mixed: string}
mixedRec: {Mixed: string} @test(eq, {#Mixed: string, Mixed: string})
-- out/errors.txt --
[eval] foo.feild: field not allowed:
    ./in.cue:16:7
[eval] foo1.recursive.feild: field not allowed:
    ./in.cue:22:3
-- out/eval/stats --
Leaks:  0
Freed:  28
Reused: 14
Allocs: 14
Retain: 0

Unifications: 28
Conjuncts:    43
Disjuncts:    0

NumCloseIDs: 7
-- out/todo.txt --
Positions / reordering.
