cuelang.org/go@v0.13.0/cue/testdata/fulleval/046_non-structural_direct_cycles.txtar (about) 1 #name: non-structural direct cycles 2 #evalFull 3 -- in.cue -- 4 c1: {bar: baz: 2} & c1.bar 5 c2: {bar: 1} & c2.bar 6 -- out/def -- 7 c1: { 8 bar: { 9 baz: 2 10 } 11 } & c1.bar 12 c2: _|_ // conflicting values {bar: 1} and 1 (mismatched types struct and int) 13 -- out/legacy-debug -- 14 <0>{c1: <1>{bar: <2>{baz: 2}, baz: 2}, c2: _|_(conflicting values {bar: 1} and 1 (mismatched types struct and int))} 15 -- out/compile -- 16 --- in.cue 17 { 18 c1: ({ 19 bar: { 20 baz: 2 21 } 22 } & 〈0;c1〉.bar) 23 c2: ({ 24 bar: 1 25 } & 〈0;c2〉.bar) 26 } 27 -- out/eval/stats -- 28 Leaks: 0 29 Freed: 7 30 Reused: 3 31 Allocs: 4 32 Retain: 2 33 34 Unifications: 7 35 Conjuncts: 10 36 Disjuncts: 8 37 -- out/evalalpha -- 38 Errors: 39 c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 40 ./in.cue:2:5 41 ./in.cue:2:16 42 43 Result: 44 (_|_){ 45 // [eval] 46 c1: (struct){ 47 bar: (struct){ 48 baz: (int){ 2 } 49 } 50 baz: (int){ 2 } 51 } 52 c2: (_|_){ 53 // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 54 // ./in.cue:2:5 55 // ./in.cue:2:16 56 bar: (_|_){// 1 57 } 58 } 59 } 60 -- diff/-out/evalalpha<==>+out/eval -- 61 diff old new 62 --- old 63 +++ new 64 @@ -16,6 +16,7 @@ 65 // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 66 // ./in.cue:2:5 67 // ./in.cue:2:16 68 - bar: (int){ 1 } 69 + bar: (_|_){// 1 70 + } 71 } 72 } 73 -- diff/todo/p3 -- 74 Additional error message. Seems okay. 75 -- out/eval -- 76 Errors: 77 c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 78 ./in.cue:2:5 79 ./in.cue:2:16 80 81 Result: 82 (_|_){ 83 // [eval] 84 c1: (struct){ 85 bar: (struct){ 86 baz: (int){ 2 } 87 } 88 baz: (int){ 2 } 89 } 90 c2: (_|_){ 91 // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 92 // ./in.cue:2:5 93 // ./in.cue:2:16 94 bar: (int){ 1 } 95 } 96 }