| # DO NOT EDIT; generated by go run testdata/gen.go |
| # |
| #name: bound conversions |
| #evalPartial |
| -- in.cue -- |
| r0: int & >0.1 & <=1.9 |
| r1: int & >0.1 & <1.9 |
| r2: int & >=0.1 & <1.9 |
| r3: int & >=-1.9 & <=-0.1 |
| r4: int & >-1.9 & <=-0.1 |
| |
| r5: >=1.1 & <=1.1 |
| r6: r5 & 1.1 |
| |
| c1: (1.2 & >1.3) & <2 |
| c2: 1.2 & (>1.3 & <2) |
| |
| c3: 1.2 & (>=1 & <2) |
| c4: 1.2 & (>=1 & <2 & int) |
| -- out/def -- |
| r0: 1 |
| r1: 1 |
| r2: 1 |
| r3: -1 |
| r4: -1 |
| r5: 1.1 |
| r6: 1.1 |
| c1: _|_ // invalid value 1.2 (out of bound >1.3) |
| c2: _|_ // invalid value 1.2 (out of bound >1.3) |
| c3: 1.2 |
| c4: _|_ // conflicting values 1.2 and ((>=1 & <2) & int) (mismatched types float and int) |
| -- out/legacy-debug -- |
| <0>{r0: 1, r1: 1, r2: 1, r3: -1, r4: -1, r5: 1.1, r6: 1.1, c1: _|_((>1.3 & 1.2):invalid value 1.2 (out of bound >1.3)), c2: _|_((>1.3 & 1.2):invalid value 1.2 (out of bound >1.3)), c3: 1.2, c4: _|_((1.2 & ((>=1 & <2) & int)):conflicting values 1.2 and ((>=1 & <2) & int) (mismatched types float and int))} |
| -- out/compile -- |
| --- in.cue |
| { |
| r0: ((int & >0.1) & <=1.9) |
| r1: ((int & >0.1) & <1.9) |
| r2: ((int & >=0.1) & <1.9) |
| r3: ((int & >=-1.9) & <=-0.1) |
| r4: ((int & >-1.9) & <=-0.1) |
| r5: (>=1.1 & <=1.1) |
| r6: (〈0;r5〉 & 1.1) |
| c1: ((1.2 & >1.3) & <2) |
| c2: (1.2 & (>1.3 & <2)) |
| c3: (1.2 & (>=1 & <2)) |
| c4: (1.2 & ((>=1 & <2) & int)) |
| } |
| -- out/eval -- |
| Errors: |
| c4: conflicting values 1.2 and int (mismatched types float and int): |
| ./in.cue:14:5 |
| ./in.cue:14:23 |
| c1: invalid value 1.2 (out of bound >1.3): |
| ./in.cue:10:12 |
| ./in.cue:10:6 |
| c2: invalid value 1.2 (out of bound >1.3): |
| ./in.cue:11:12 |
| ./in.cue:11:5 |
| |
| Result: |
| (_|_){ |
| // [eval] |
| r0: (int){ 1 } |
| r1: (int){ 1 } |
| r2: (int){ 1 } |
| r3: (int){ -1 } |
| r4: (int){ -1 } |
| r5: (number){ 1.1 } |
| r6: (number){ 1.1 } |
| c1: (_|_){ |
| // [eval] c1: invalid value 1.2 (out of bound >1.3): |
| // ./in.cue:10:12 |
| // ./in.cue:10:6 |
| } |
| c2: (_|_){ |
| // [eval] c2: invalid value 1.2 (out of bound >1.3): |
| // ./in.cue:11:12 |
| // ./in.cue:11:5 |
| } |
| c3: (float){ 1.2 } |
| c4: (_|_){ |
| // [eval] c4: conflicting values 1.2 and int (mismatched types float and int): |
| // ./in.cue:14:5 |
| // ./in.cue:14:23 |
| } |
| } |