blob: 4094bd2273eb47f6ddc3b785496776ca3f014a7e [file] [log] [blame]
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: definitions
#evalPartial
-- in.cue --
#Foo: {
field: int
recursive: {
field: string
}
}
// Allowed
#Foo1: {field: int}
#Foo1: {field2: string}
foo: #Foo
foo: {feild: 2}
foo1: #Foo
foo1: {
field: 2
recursive: {
feild: 2 // Not caught as per spec. TODO: change?
}
}
#Bar: {
field: int
{[A=_]: int}
}
bar: #Bar
bar: {feild: 2}
#Mixed: string
Mixed: string
mixedRec: {#Mixed: string}
mixedRec: {Mixed: string}
-- out/def --
#Foo: {
field: int
recursive: {
field: string
}
}
// Allowed
#Foo1: {
field: int
field2: string
}
foo: _|_ // field "feild" not allowed in closed struct
foo1: #Foo & {
field: 2
recursive: {
feild: 2
}
}
#Bar: {
{[A=string]: int}
field: int
}
bar: #Bar & {
feild: 2
}
#Mixed: string
Mixed: string
mixedRec: {
#Mixed: string
Mixed: string
}
-- out/legacy-debug --
<0>{#Foo: <1>C{field: int, recursive: <2>C{field: string}}, #Foo1: <3>C{field: int, field2: string}, foo: _|_(2:field "feild" not allowed in closed struct), foo1: <4>C{field: 2, recursive: _|_(2:field "feild" not allowed in closed struct)}, #Bar: <5>{[]: <6>(A: string)->int, field: int}, bar: <7>{[]: <8>(A: string)->int, field: int, feild: 2}, #Mixed: string, Mixed: string, mixedRec: <9>{#Mixed: string, Mixed: string}}
-- out/compile --
--- in.cue
{
#Foo: {
field: int
recursive: {
field: string
}
}
#Foo1: {
field: int
}
#Foo1: {
field2: string
}
foo: 0;#Foo
foo: {
feild: 2
}
foo1: 0;#Foo
foo1: {
field: 2
recursive: {
feild: 2
}
}
#Bar: {
field: int
{
[_]: int
}
}
bar: 0;#Bar
bar: {
feild: 2
}
#Mixed: string
Mixed: string
mixedRec: {
#Mixed: string
}
mixedRec: {
Mixed: string
}
}