| # DO NOT EDIT; generated by go run testdata/gen.go |
| # |
| #name: comparison against bottom |
| #evalFull |
| -- in.cue -- |
| a: _|_ == _|_ |
| b: err == 1 & 2 // not a literal error, so not allowed |
| c: err == _|_ // allowed |
| d: err != _|_ // allowed |
| e: err != 1 & 3 |
| // z: err == err // TODO: should infer to be true? |
| f: ({a: 1} & {a: 2}) == _|_ |
| g: ({a: 1} & {b: 2}) == _|_ |
| h: _|_ == ({a: 1} & {a: 2}) |
| i: _|_ == ({a: 1} & {b: 2}) |
| |
| err: 1 & 2 |
| -- out/def -- |
| a: true |
| b: _|_ // conflicting values 1 and 2 |
| err: _|_ // conflicting values 1 and 2 |
| c: true |
| d: false |
| e: _|_ // conflicting values 1 and 2 |
| // z: err == err // TODO: should infer to be true? |
| f: true |
| g: false |
| h: true |
| i: false |
| -- out/legacy-debug -- |
| <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} |
| -- out/compile -- |
| --- in.cue |
| { |
| a: (_|_(explicit error (_|_ literal) in source) == _|_(explicit error (_|_ literal) in source)) |
| b: ((〈0;err〉 == 1) & 2) |
| c: (〈0;err〉 == _|_(explicit error (_|_ literal) in source)) |
| d: (〈0;err〉 != _|_(explicit error (_|_ literal) in source)) |
| e: ((〈0;err〉 != 1) & 3) |
| f: (({ |
| a: 1 |
| } & { |
| a: 2 |
| }) == _|_(explicit error (_|_ literal) in source)) |
| g: (({ |
| a: 1 |
| } & { |
| b: 2 |
| }) == _|_(explicit error (_|_ literal) in source)) |
| h: (_|_(explicit error (_|_ literal) in source) == ({ |
| a: 1 |
| } & { |
| a: 2 |
| })) |
| i: (_|_(explicit error (_|_ literal) in source) == ({ |
| a: 1 |
| } & { |
| b: 2 |
| })) |
| err: (1 & 2) |
| } |
| -- out/eval -- |
| Errors: |
| err: conflicting values 2 and 1: |
| ./in.cue:12:6 |
| ./in.cue:12:10 |
| |
| Result: |
| (_|_){ |
| // [eval] |
| a: (bool){ true } |
| b: (_|_){ |
| // [eval] err: conflicting values 2 and 1: |
| // ./in.cue:12:6 |
| // ./in.cue:12:10 |
| } |
| c: (bool){ true } |
| d: (bool){ false } |
| e: (_|_){ |
| // [eval] err: conflicting values 2 and 1: |
| // ./in.cue:12:6 |
| // ./in.cue:12:10 |
| } |
| f: (bool){ true } |
| g: (bool){ false } |
| h: (bool){ true } |
| i: (bool){ false } |
| err: (_|_){ |
| // [eval] err: conflicting values 2 and 1: |
| // ./in.cue:12:6 |
| // ./in.cue:12:10 |
| } |
| } |