blob: 1b69449f6bfc910cfa287983335d46c194454e46 [file] [log] [blame]
-- in.cue --
a: {
{{
b
c
d: b
e: c
}}
c: {}
}
b: {
}
s: "foo"
c: s
// s is technically in a new struct here so it will have a one higher count than
// the one before.
d: [s]: 3
e: { }
e & { // Is this allowed? Probably not as per comprehension rule (ref fixes.)
e: {}
}
{X=["foo"]: b: X | null}
{[Y="bar"]: b: Y}
B = {open: int}
f: B
schema: {
next: _schema_1
}
let _schema_1 = schema
-- out/compile --
--- in.cue
{
a: {
{
{
3;b
2;c
d: 3;b
e: 2;c
}
}
c: {}
}
b: {}
s: "foo"
c: 0;s
d: {
[〈1;s〉]: 3
}
e: {}
(〈0;e & {
e: {}
})
{
["foo"]: {
b: (〈1;(〈1;-〉)〉|null)
}
}
{
["bar"]: {
b: 1;-〉
}
}
f: 0;let B
schema: {
next: 1;let _schema_1
}
}
-- out/eval --
Errors:
schema.next: structural cycle
Result:
(_|_){
// [structural cycle]
e: (struct){
}
a: (struct){
d: (struct){
}
e: (struct){
}
c: (struct){
}
}
b: (struct){
}
s: (string){ "foo" }
c: (string){ "foo" }
d: (struct){
}
f: (struct){
open: (int){ int }
}
schema: (_|_){
// [structural cycle]
next: (_|_){
// [structural cycle] schema.next: structural cycle
next: (_|_){// 〈1;let _schema_1〉
}
}
}
}