# 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/stats -- Leaks: 0 Freed: 12 Reused: 10 Allocs: 2 Retain: 0 Unifications: 12 Conjuncts: 35 Disjuncts: 12 -- out/evalalpha -- 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: (float){ 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 } } -- diff/-out/evalalpha<==>+out/eval -- diff old new --- old +++ new @@ -18,7 +18,7 @@ r3: (int){ -1 } r4: (int){ -1 } r5: (number){ 1.1 } - r6: (number){ 1.1 } + r6: (float){ 1.1 } c1: (_|_){ // [eval] c1: invalid value 1.2 (out of bound >1.3): // ./in.cue:10:12 -- diff/todo/p3 -- Seems like a correct fix, but investigate. This is independent from the fact that we probably want to relax the type of float literals to number. -- 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 } }