blob: ef7fc0524358e66b389623449e9f4acbe2d736a8 [file] [log] [blame]
-- in.cue --
#Foo: {
x: string
#More
}
#More: [=~ "^x-"]: _
foo: #Foo & {
x: "hello"
y: "goodbye"
}
-- out/eval --
Errors:
foo: field not allowed: y:
./in.cue:1:7
./in.cue:3:2
./in.cue:6:8
./in.cue:8:6
./in.cue:10:2
Result:
(_|_){
// [eval]
#Foo: (#struct){
x: (string){ string }
}
#More: (#struct){
}
foo: (_|_){
// [eval]
x: (string){ "hello" }
y: (_|_){
// [eval] foo: field not allowed: y:
// ./in.cue:1:7
// ./in.cue:3:2
// ./in.cue:6:8
// ./in.cue:8:6
// ./in.cue:10:2
}
}
}
-- out/compile --
--- in.cue
{
#Foo: {
x: string
1;#More
}
#More: {
[=~"^x-"]: _
}
foo: (〈0;#Foo & {
x: "hello"
y: "goodbye"
})
}