blob: f3c144c395f9b58295c5ebd1f68280f8bb85e8d1 [file] [log] [blame]
-- in.cue --
#Foo: {
x: string
#More
}
#More: [=~ "^x-"]: _
foo: #Foo & {
x: "hello"
y: "goodbye"
}
-- out/eval --
Errors:
foo: field y not allowed:
./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 y not allowed:
// ./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"
})
}