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