cuelang.org/go@v0.10.1/cue/testdata/builtins/issue490.txtar (about) 1 -- test.cue -- 2 A: close({ 3 a: 1 4 b: 2 5 }) 6 7 B: A & { 8 c: 3 9 } 10 -- out/eval/stats -- 11 Leaks: 2 12 Freed: 8 13 Reused: 5 14 Allocs: 5 15 Retain: 2 16 17 Unifications: 10 18 Conjuncts: 14 19 Disjuncts: 10 20 -- out/evalalpha -- 21 Errors: 22 B.c: field not allowed: 23 ./test.cue:1:4 24 ./test.cue:7:2 25 26 Result: 27 (_|_){ 28 // [eval] 29 A: (#struct){ 30 a: (int){ 1 } 31 b: (int){ 2 } 32 } 33 B: (_|_){ 34 // [eval] 35 c: (_|_){ 36 // [eval] B.c: field not allowed: 37 // ./test.cue:1:4 38 // ./test.cue:7:2 39 } 40 a: (int){ 1 } 41 b: (int){ 2 } 42 } 43 } 44 -- diff/-out/evalalpha<==>+out/eval -- 45 diff old new 46 --- old 47 +++ new 48 @@ -1,7 +1,6 @@ 49 Errors: 50 B.c: field not allowed: 51 - ./test.cue:1:10 52 - ./test.cue:6:4 53 + ./test.cue:1:4 54 ./test.cue:7:2 55 56 Result: 57 @@ -13,13 +12,12 @@ 58 } 59 B: (_|_){ 60 // [eval] 61 - a: (int){ 1 } 62 - b: (int){ 2 } 63 c: (_|_){ 64 // [eval] B.c: field not allowed: 65 - // ./test.cue:1:10 66 - // ./test.cue:6:4 67 + // ./test.cue:1:4 68 // ./test.cue:7:2 69 } 70 + a: (int){ 1 } 71 + b: (int){ 2 } 72 } 73 } 74 -- diff/todo/p2 -- 75 positions 76 -- diff/todo/p3 -- 77 Reordering 78 -- out/eval -- 79 Errors: 80 B.c: field not allowed: 81 ./test.cue:1:10 82 ./test.cue:6:4 83 ./test.cue:7:2 84 85 Result: 86 (_|_){ 87 // [eval] 88 A: (#struct){ 89 a: (int){ 1 } 90 b: (int){ 2 } 91 } 92 B: (_|_){ 93 // [eval] 94 a: (int){ 1 } 95 b: (int){ 2 } 96 c: (_|_){ 97 // [eval] B.c: field not allowed: 98 // ./test.cue:1:10 99 // ./test.cue:6:4 100 // ./test.cue:7:2 101 } 102 } 103 } 104 -- out/compile -- 105 --- test.cue 106 { 107 A: close({ 108 a: 1 109 b: 2 110 }) 111 B: (ć0;Ać & { 112 c: 3 113 }) 114 }