cuelang.org/go@v0.13.0/cue/testdata/fulleval/031_comparison_against_bottom.txtar (about) 1 #name: comparison against bottom 2 #evalFull 3 -- in.cue -- 4 a: _|_ == _|_ 5 b: err == 1 & 2 // not a literal error, so not allowed 6 c: err == _|_ // allowed 7 d: err != _|_ // allowed 8 e: err != 1 & 3 9 // z: err == err // TODO: should infer to be true? 10 f: ({a: 1} & {a: 2}) == _|_ 11 g: ({a: 1} & {b: 2}) == _|_ 12 h: _|_ == ({a: 1} & {a: 2}) 13 i: _|_ == ({a: 1} & {b: 2}) 14 15 err: 1 & 2 16 -- out/def -- 17 a: true 18 b: _|_ // conflicting values 1 and 2 19 err: _|_ // conflicting values 1 and 2 20 c: true 21 d: false 22 e: _|_ // conflicting values 1 and 2 23 // z: err == err // TODO: should infer to be true? 24 f: true 25 g: false 26 h: true 27 i: false 28 -- out/legacy-debug -- 29 <0>{a: true, b: _|_((1 & 2):conflicting values 1 and 2), err: _|_((1 & 2):conflicting values 1 and 2), c: true, d: false, e: _|_((1 & 2):conflicting values 1 and 2), f: true, g: false, h: true, i: false} 30 -- out/compile -- 31 --- in.cue 32 { 33 a: (_|_(explicit error (_|_ literal) in source) == _|_(explicit error (_|_ literal) in source)) 34 b: ((〈0;err〉 == 1) & 2) 35 c: (〈0;err〉 == _|_(explicit error (_|_ literal) in source)) 36 d: (〈0;err〉 != _|_(explicit error (_|_ literal) in source)) 37 e: ((〈0;err〉 != 1) & 3) 38 f: (({ 39 a: 1 40 } & { 41 a: 2 42 }) == _|_(explicit error (_|_ literal) in source)) 43 g: (({ 44 a: 1 45 } & { 46 b: 2 47 }) == _|_(explicit error (_|_ literal) in source)) 48 h: (_|_(explicit error (_|_ literal) in source) == ({ 49 a: 1 50 } & { 51 a: 2 52 })) 53 i: (_|_(explicit error (_|_ literal) in source) == ({ 54 a: 1 55 } & { 56 b: 2 57 })) 58 err: (1 & 2) 59 } 60 -- out/eval/stats -- 61 Leaks: 0 62 Freed: 21 63 Reused: 16 64 Allocs: 5 65 Retain: 4 66 67 Unifications: 21 68 Conjuncts: 28 69 Disjuncts: 21 70 -- out/eval -- 71 Errors: 72 err: conflicting values 2 and 1: 73 ./in.cue:12:6 74 ./in.cue:12:10 75 76 Result: 77 (_|_){ 78 // [eval] 79 a: (bool){ true } 80 b: (_|_){ 81 // [eval] err: conflicting values 2 and 1: 82 // ./in.cue:12:6 83 // ./in.cue:12:10 84 } 85 c: (bool){ true } 86 d: (bool){ false } 87 e: (_|_){ 88 // [eval] err: conflicting values 2 and 1: 89 // ./in.cue:12:6 90 // ./in.cue:12:10 91 } 92 f: (bool){ true } 93 g: (bool){ false } 94 h: (bool){ true } 95 i: (bool){ false } 96 err: (_|_){ 97 // [eval] err: conflicting values 2 and 1: 98 // ./in.cue:12:6 99 // ./in.cue:12:10 100 } 101 }