blob: 3b9900202418c728e508a18b7fa263914727e0d6 [file] [log] [blame]
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: Issue #153
#evalFull
-- in.cue --
Foo: {
listOfCloseds: [...#Closed]
}
#Closed: {
a: int | *0
}
Junk: {
b: 2
}
Foo & {
listOfCloseds: [{
for k, v in Junk {
"\(k)": v
}
}]
}
-- out/def --
Foo: {
listOfCloseds: [...#Closed]
}
listOfCloseds: [_|_, // field "b" not allowed in closed struct
]
#Closed: {
a: int | *0
}
Junk: {
b: 2
}
-- out/legacy-debug --
<0>{<1>{listOfCloseds: [_|_(<2>.v:field "b" not allowed in closed struct)]}, Foo: <3>{listOfCloseds: []}, #Closed: <4>C{a: 0}, Junk: <5>{b: 2}}
-- out/compile --
--- in.cue
{
Foo: {
listOfCloseds: [
...〈1;#Closed〉,
]
}
#Closed: {
a: (int|*0)
}
Junk: {
b: 2
}
(〈0;Foo & {
listOfCloseds: [
{
for k, v in 2;Junk {
"\(〈1;k〉)": 1;v
}
},
]
})
}
-- out/eval --
Errors:
listOfCloseds.0: field `b` not allowed
Result:
(_|_){
// [eval]
listOfCloseds: (_|_){
// [eval]
0: (_|_){
// [eval] listOfCloseds.0: field `b` not allowed
a: (int){ |(*(int){ 0 }, (int){ int }) }
b: (int){ 2 }
}
}
Foo: (struct){
listOfCloseds: (list){
}
}
#Closed: (struct){
a: (int){ |(*(int){ 0 }, (int){ int }) }
}
Junk: (struct){
b: (int){ 2 }
}
}