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