1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
-- in.cue --
object: #Leaf & {}
#Base: {
extra?: {...}
}
#Mid: {
#Base
}
#Leaf: {
#Mid
extra?: {...}
more?: int
if extra.foo != _|_ {
if more != _|_ {
foo: "bar"
}
}
}
-- out/eval --
(struct){
object: (#struct){
extra?: (#struct){
}
more?: (int){ int }
}
#Base: (#struct){
extra?: (#struct){
}
}
#Mid: (#struct){
extra?: (#struct){
}
}
#Leaf: (#struct){
extra?: (#struct){
}
more?: (int){ int }
}
}
-- out/eval/stats --
Leaks: 0
Freed: 11
Reused: 5
Allocs: 6
Retain: 7
Unifications: 11
Conjuncts: 25
Disjuncts: 18
NumCloseIDs: 2
-- out/compile --
--- in.cue
{
object: (〈0;#Leaf〉 & {})
#Base: {
extra?: {
...
}
}
#Mid: {
〈1;#Base〉
}
#Leaf: {
〈1;#Mid〉
extra?: {
...
}
more?: int
if (〈0;extra〉.foo != _|_(explicit error (_|_ literal) in source)) {
if (〈1;more〉 != _|_(explicit error (_|_ literal) in source)) {
foo: "bar"
}
}
}
}
|