blob: ca1ed5bd4d6372c4c5a435c0ef6abf4899349193 [file] [log] [blame]
-- in.cue --
package lpcorpus
#Value: {type: "int"} | {type: "float"} | {type: "string"}
foo: [{type: "float"}] & [...#Value]
foo: [{type: "float"}] & [...#Value]
foo: [{type: "float"}] & [...#Value]
foo: [{type: "float"}] & [...#Value]
foo: [{type: "float"}] & [...#Value]
foo: [{type: "string"}] & [...#Value]
foo: [{type: "string"}] & [...#Value]
foo: [{type: "string"}] & [...#Value]
foo: [{type: "float"}] & [...#Value]
foo: [{type: "float"}] & [...#Value]
-- out/eval --
Errors:
foo.0: 2 errors in empty disjunction:
foo.0.type: conflicting values "int" and "float":
./in.cue:3:16
./in.cue:5:14
./in.cue:5:30
foo.0.type: conflicting values "string" and "float":
./in.cue:5:14
./in.cue:10:14
Result:
(_|_){
// [eval]
#Value: (struct){ |((#struct){
type: (string){ "int" }
}, (#struct){
type: (string){ "float" }
}, (#struct){
type: (string){ "string" }
}) }
foo: (_|_){
// [eval]
0: (_|_){
// [eval] foo.0: 2 errors in empty disjunction:
// foo.0.type: conflicting values "int" and "float":
// ./in.cue:3:16
// ./in.cue:5:14
// ./in.cue:5:30
// foo.0.type: conflicting values "string" and "float":
// ./in.cue:5:14
// ./in.cue:10:14
type: (_|_){
// [eval] foo.0.type: conflicting values "string" and "float":
// ./in.cue:5:14
// ./in.cue:10:14
}
}
}
}
-- out/compile --
--- in.cue
{
#Value: ({
type: "int"
}|{
type: "float"
}|{
type: "string"
})
foo: ([
{
type: "float"
},
] & [
...〈0;#Value〉,
])
foo: ([
{
type: "float"
},
] & [
...〈0;#Value〉,
])
foo: ([
{
type: "float"
},
] & [
...〈0;#Value〉,
])
foo: ([
{
type: "float"
},
] & [
...〈0;#Value〉,
])
foo: ([
{
type: "float"
},
] & [
...〈0;#Value〉,
])
foo: ([
{
type: "string"
},
] & [
...〈0;#Value〉,
])
foo: ([
{
type: "string"
},
] & [
...〈0;#Value〉,
])
foo: ([
{
type: "string"
},
] & [
...〈0;#Value〉,
])
foo: ([
{
type: "float"
},
] & [
...〈0;#Value〉,
])
foo: ([
{
type: "float"
},
] & [
...〈0;#Value〉,
])
}