# DO NOT EDIT; generated by go run testdata/gen.go | |
# | |
#name: augment closed optionals | |
#evalFull | |
-- in.cue -- | |
#A: { | |
[=~"^[a-s]*$"]: int | |
} | |
#B: { | |
[=~"^[m-z]*?"]: int | |
} | |
#C: { | |
#A & #B | |
{[=~"^Q*$"]: int} | |
} | |
c: #C & {QQ: 3} | |
#D: { | |
#A | |
#B | |
} | |
d: #D & {aaa: 4} | |
-- out/def -- | |
#A: { | |
[=~"^[a-s]*$"]: int | |
} | |
#B: { | |
[=~"^[m-z]*?"]: int | |
} | |
#C: { | |
#A & #B | |
{[=~"^Q*$"]: int} | |
} | |
c: #C & { | |
QQ: 3 | |
} | |
#D: { | |
#A | |
#B | |
} | |
d: #D & { | |
aaa: 4 | |
} | |
-- out/export -- | |
c: { | |
QQ: 3 | |
} | |
d: { | |
aaa: 4 | |
} | |
-- out/yaml -- | |
c: | |
QQ: 3 | |
d: | |
aaa: 4 | |
-- out/json -- | |
{"c":{"QQ":3},"d":{"aaa":4}} | |
-- out/legacy-debug -- | |
<0>{#A: <1>C{[=~"^[a-s]*$"]: <2>(_: string)->int, }, #B: <3>C{[=~"^[m-z]*?"]: <4>(_: string)->int, }, #C: <5>C{C{[=~"^Q*$"]: <6>(_: string)->int}, C{(C{[=~"^[a-s]*$"]: <7>(_: string)->int} & C{[=~"^[m-z]*?"]: <8>(_: string)->int})}, }, c: <9>C{C{[=~"^Q*$"]: <10>(_: string)->int}, C{(C{[=~"^[a-s]*$"]: <11>(_: string)->int} & C{[=~"^[m-z]*?"]: <12>(_: string)->int})}, QQ: 3}, #D: <13>C{[=~"^[a-s]*$"]: <14>(_: string)->int, [=~"^[m-z]*?"]: <15>(_: string)->int, }, d: <16>C{[=~"^[a-s]*$"]: <17>(_: string)->int, [=~"^[m-z]*?"]: <18>(_: string)->int, aaa: 4}} | |
-- out/compile -- | |
--- in.cue | |
{ | |
#A: { | |
[=~"^[a-s]*$"]: int | |
} | |
#B: { | |
[=~"^[m-z]*?"]: int | |
} | |
#C: { | |
(〈1;#A〉 & 〈1;#B〉) | |
{ | |
[=~"^Q*$"]: int | |
} | |
} | |
c: (〈0;#C〉 & { | |
QQ: 3 | |
}) | |
#D: { | |
〈1;#A〉 | |
〈1;#B〉 | |
} | |
d: (〈0;#D〉 & { | |
aaa: 4 | |
}) | |
} | |
-- out/eval -- | |
(struct){ | |
#A: (#struct){ | |
} | |
#B: (#struct){ | |
} | |
#C: (#struct){ | |
} | |
c: (#struct){ | |
QQ: (int){ 3 } | |
} | |
#D: (#struct){ | |
} | |
d: (#struct){ | |
aaa: (int){ 4 } | |
} | |
} |