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