# DO NOT EDIT; generated by go run testdata/gen.go # #name: range unification #evalPartial -- in.cue -- // with concrete values a1: >=1 & <=5 & 3 a2: >=1 & <=5 & 1 a3: >=1 & <=5 & 5 a4: >=1 & <=5 & 6 a5: >=1 & <=5 & 0 a6: 3 & >=1 & <=5 a7: 1 & >=1 & <=5 a8: 5 & >=1 & <=5 a9: 6 & >=1 & <=5 a10: 0 & >=1 & <=5 // with ranges b1: >=1 & <=5 & >=1 & <=5 b2: >=1 & <=5 & >=1 & <=1 b3: >=1 & <=5 & >=5 & <=5 b4: >=1 & <=5 & >=2 & <=3 b5: >=1 & <=5 & >=3 & <=9 b6: >=1 & <=5 & >=5 & <=9 b7: >=1 & <=5 & >=6 & <=9 b8: >=1 & <=5 & >=1 & <=5 b9: >=1 & <=1 & >=1 & <=5 b10: >=5 & <=5 & >=1 & <=5 b11: >=2 & <=3 & >=1 & <=5 b12: >=3 & <=9 & >=1 & <=5 b13: >=5 & <=9 & >=1 & <=5 b14: >=6 & <=9 & >=1 & <=5 // ranges with more general types c1: int & >=1 & <=5 c2: >=1 & <=5 & int c3: string & >=1 & <=5 c4: >=1 & <=5 & string // other types s1: >="d" & <="z" & "e" s2: >="d" & <="z" & "ee" n1: number & >=1 & <=2 n2: int & >=1.1 & <=1.3 n3: >=1.0 & <=3.0 & 2 n4: >=0.0 & <=0.1 & 0.09999 n5: >=1 & <=5 & 2.5 -- out/def -- // with concrete values a1: 3 a2: 1 a3: 5 a4: _|_ // invalid value 6 (out of bound <=5) a5: _|_ // invalid value 0 (out of bound >=1) a6: 3 a7: 1 a8: 5 a9: _|_ // invalid value 6 (out of bound <=5) a10: _|_ // invalid value 0 (out of bound >=1) // with ranges b1: >=1 & <=5 b2: 1 b3: 5 b4: >=2 & <=3 b5: >=3 & <=5 b6: 5 b7: _|_ // conflicting bounds >=6 and <=5 b8: >=1 & <=5 b9: 1 b10: 5 b11: >=2 & <=3 b12: >=3 & <=5 b13: 5 b14: _|_ // conflicting bounds >=6 and <=5 // ranges with more general types c1: uint & >=1 & <=5 c2: uint & >=1 & <=5 c3: _|_ // conflicting values string and >=1 (mismatched types string and number) c4: _|_ // conflicting values (>=1 & <=5) and string (mismatched types number and string) // other types s1: "e" s2: "ee" n1: >=1 & <=2 n2: _|_ // conflicting bounds int & >=1.1 and <=1.3 n3: 2 n4: 0.09999 n5: 2.5 -- out/legacy-debug -- <0>{a1: 3, a2: 1, a3: 5, a4: _|_((<=5 & 6):invalid value 6 (out of bound <=5)), a5: _|_((>=1 & 0):invalid value 0 (out of bound >=1)), a6: 3, a7: 1, a8: 5, a9: _|_((<=5 & 6):invalid value 6 (out of bound <=5)), a10: _|_((>=1 & 0):invalid value 0 (out of bound >=1)), b1: (>=1 & <=5), b2: 1, b3: 5, b4: (>=2 & <=3), b5: (>=3 & <=5), b6: 5, b7: _|_(conflicting bounds >=6 and <=5), b8: (>=1 & <=5), b9: 1, b10: 5, b11: (>=2 & <=3), b12: (>=3 & <=5), b13: 5, b14: _|_(conflicting bounds >=6 and <=5), c1: (int & >=1 & <=5), c2: (<=5 & int & >=1), c3: _|_((string & >=1):conflicting values string and >=1 (mismatched types string and number)), c4: _|_(((>=1 & <=5) & string):conflicting values (>=1 & <=5) and string (mismatched types number and string)), s1: "e", s2: "ee", n1: (>=1 & <=2), n2: _|_(conflicting bounds int & >=1.1 and <=1.3), n3: 2, n4: 0.09999, n5: 2.5} -- out/compile -- --- in.cue { a1: ((>=1 & <=5) & 3) a2: ((>=1 & <=5) & 1) a3: ((>=1 & <=5) & 5) a4: ((>=1 & <=5) & 6) a5: ((>=1 & <=5) & 0) a6: ((3 & >=1) & <=5) a7: ((1 & >=1) & <=5) a8: ((5 & >=1) & <=5) a9: ((6 & >=1) & <=5) a10: ((0 & >=1) & <=5) b1: (((>=1 & <=5) & >=1) & <=5) b2: (((>=1 & <=5) & >=1) & <=1) b3: (((>=1 & <=5) & >=5) & <=5) b4: (((>=1 & <=5) & >=2) & <=3) b5: (((>=1 & <=5) & >=3) & <=9) b6: (((>=1 & <=5) & >=5) & <=9) b7: (((>=1 & <=5) & >=6) & <=9) b8: (((>=1 & <=5) & >=1) & <=5) b9: (((>=1 & <=1) & >=1) & <=5) b10: (((>=5 & <=5) & >=1) & <=5) b11: (((>=2 & <=3) & >=1) & <=5) b12: (((>=3 & <=9) & >=1) & <=5) b13: (((>=5 & <=9) & >=1) & <=5) b14: (((>=6 & <=9) & >=1) & <=5) c1: ((int & >=1) & <=5) c2: ((>=1 & <=5) & int) c3: ((string & >=1) & <=5) c4: ((>=1 & <=5) & string) s1: ((>="d" & <="z") & "e") s2: ((>="d" & <="z") & "ee") n1: ((number & >=1) & <=2) n2: ((int & >=1.1) & <=1.3) n3: ((>=1.0 & <=3.0) & 2) n4: ((>=0.0 & <=0.1) & 0.09999) n5: ((>=1 & <=5) & 2.5) } -- out/eval/stats -- Leaks: 0 Freed: 36 Reused: 34 Allocs: 2 Retain: 0 Unifications: 36 Conjuncts: 120 Disjuncts: 36 -- out/evalalpha -- Errors: c3: conflicting values string and >=1 (mismatched types string and number): ./in.cue:34:5 ./in.cue:34:14 c4: conflicting values string and >=1 (mismatched types string and number): ./in.cue:35:5 ./in.cue:35:17 a4: invalid value 6 (out of bound <=5): ./in.cue:5:11 ./in.cue:5:17 a5: invalid value 0 (out of bound >=1): ./in.cue:6:5 ./in.cue:6:17 a9: invalid value 6 (out of bound <=5): ./in.cue:11:16 ./in.cue:11:6 a10: invalid value 0 (out of bound >=1): ./in.cue:12:10 ./in.cue:12:6 b7: incompatible bounds >=6 and <=5: ./in.cue:21:17 ./in.cue:21:11 b14: incompatible bounds >=6 and <=5: ./in.cue:29:24 ./in.cue:29:6 n2: incompatible bounds >=1.1 and <=1.3: ./in.cue:42:19 ./in.cue:42:11 Result: (_|_){ // [eval] a1: (int){ 3 } a2: (int){ 1 } a3: (int){ 5 } a4: (_|_){ // [eval] a4: invalid value 6 (out of bound <=5): // ./in.cue:5:11 // ./in.cue:5:17 } a5: (_|_){ // [eval] a5: invalid value 0 (out of bound >=1): // ./in.cue:6:5 // ./in.cue:6:17 } a6: (int){ 3 } a7: (int){ 1 } a8: (int){ 5 } a9: (_|_){ // [eval] a9: invalid value 6 (out of bound <=5): // ./in.cue:11:16 // ./in.cue:11:6 } a10: (_|_){ // [eval] a10: invalid value 0 (out of bound >=1): // ./in.cue:12:10 // ./in.cue:12:6 } b1: (number){ &(>=1, <=5) } b2: (number){ 1 } b3: (number){ 5 } b4: (number){ &(>=2, <=3) } b5: (number){ &(>=3, <=5) } b6: (number){ 5 } b7: (_|_){ // [eval] b7: incompatible bounds >=6 and <=5: // ./in.cue:21:17 // ./in.cue:21:11 } b8: (number){ &(>=1, <=5) } b9: (number){ 1 } b10: (number){ 5 } b11: (number){ &(>=2, <=3) } b12: (number){ &(>=3, <=5) } b13: (number){ 5 } b14: (_|_){ // [eval] b14: incompatible bounds >=6 and <=5: // ./in.cue:29:24 // ./in.cue:29:6 } c1: (int){ &(>=1, <=5, int) } c2: (int){ &(>=1, <=5, int) } c3: (_|_){ // [eval] c3: conflicting values string and >=1 (mismatched types string and number): // ./in.cue:34:5 // ./in.cue:34:14 } c4: (_|_){ // [eval] c4: conflicting values string and >=1 (mismatched types string and number): // ./in.cue:35:5 // ./in.cue:35:17 } s1: (string){ "e" } s2: (string){ "ee" } n1: (number){ &(>=1, <=2) } n2: (_|_){ // [eval] n2: incompatible bounds >=1.1 and <=1.3: // ./in.cue:42:19 // ./in.cue:42:11 } n3: (int){ 2 } n4: (float){ 0.09999 } n5: (float){ 2.5 } } -- diff/-out/evalalpha<==>+out/eval -- diff old new --- old +++ new @@ -1,19 +1,10 @@ Errors: -b14: incompatible bounds >=6 and <=5: - ./in.cue:29:6 - ./in.cue:29:24 -b7: incompatible bounds >=6 and <=5: - ./in.cue:21:11 - ./in.cue:21:17 c3: conflicting values string and >=1 (mismatched types string and number): ./in.cue:34:5 ./in.cue:34:14 -c4: conflicting values >=1 and string (mismatched types number and string): +c4: conflicting values string and >=1 (mismatched types string and number): ./in.cue:35:5 ./in.cue:35:17 -n2: incompatible bounds >=1.1 and <=1.3: - ./in.cue:42:11 - ./in.cue:42:19 a4: invalid value 6 (out of bound <=5): ./in.cue:5:11 ./in.cue:5:17 @@ -26,6 +17,15 @@ a10: invalid value 0 (out of bound >=1): ./in.cue:12:10 ./in.cue:12:6 +b7: incompatible bounds >=6 and <=5: + ./in.cue:21:17 + ./in.cue:21:11 +b14: incompatible bounds >=6 and <=5: + ./in.cue:29:24 + ./in.cue:29:6 +n2: incompatible bounds >=1.1 and <=1.3: + ./in.cue:42:19 + ./in.cue:42:11 Result: (_|_){ @@ -64,8 +64,8 @@ b6: (number){ 5 } b7: (_|_){ // [eval] b7: incompatible bounds >=6 and <=5: - // ./in.cue:21:11 // ./in.cue:21:17 + // ./in.cue:21:11 } b8: (number){ &(>=1, <=5) } b9: (number){ 1 } @@ -75,8 +75,8 @@ b13: (number){ 5 } b14: (_|_){ // [eval] b14: incompatible bounds >=6 and <=5: - // ./in.cue:29:6 // ./in.cue:29:24 + // ./in.cue:29:6 } c1: (int){ &(>=1, <=5, int) } c2: (int){ &(>=1, <=5, int) } @@ -86,7 +86,7 @@ // ./in.cue:34:14 } c4: (_|_){ - // [eval] c4: conflicting values >=1 and string (mismatched types number and string): + // [eval] c4: conflicting values string and >=1 (mismatched types string and number): // ./in.cue:35:5 // ./in.cue:35:17 } @@ -95,8 +95,8 @@ n1: (number){ &(>=1, <=2) } n2: (_|_){ // [eval] n2: incompatible bounds >=1.1 and <=1.3: - // ./in.cue:42:11 // ./in.cue:42:19 + // ./in.cue:42:11 } n3: (int){ 2 } n4: (float){ 0.09999 } -- diff/todo/p3 -- Reordering of error messages. -- out/eval -- Errors: b14: incompatible bounds >=6 and <=5: ./in.cue:29:6 ./in.cue:29:24 b7: incompatible bounds >=6 and <=5: ./in.cue:21:11 ./in.cue:21:17 c3: conflicting values string and >=1 (mismatched types string and number): ./in.cue:34:5 ./in.cue:34:14 c4: conflicting values >=1 and string (mismatched types number and string): ./in.cue:35:5 ./in.cue:35:17 n2: incompatible bounds >=1.1 and <=1.3: ./in.cue:42:11 ./in.cue:42:19 a4: invalid value 6 (out of bound <=5): ./in.cue:5:11 ./in.cue:5:17 a5: invalid value 0 (out of bound >=1): ./in.cue:6:5 ./in.cue:6:17 a9: invalid value 6 (out of bound <=5): ./in.cue:11:16 ./in.cue:11:6 a10: invalid value 0 (out of bound >=1): ./in.cue:12:10 ./in.cue:12:6 Result: (_|_){ // [eval] a1: (int){ 3 } a2: (int){ 1 } a3: (int){ 5 } a4: (_|_){ // [eval] a4: invalid value 6 (out of bound <=5): // ./in.cue:5:11 // ./in.cue:5:17 } a5: (_|_){ // [eval] a5: invalid value 0 (out of bound >=1): // ./in.cue:6:5 // ./in.cue:6:17 } a6: (int){ 3 } a7: (int){ 1 } a8: (int){ 5 } a9: (_|_){ // [eval] a9: invalid value 6 (out of bound <=5): // ./in.cue:11:16 // ./in.cue:11:6 } a10: (_|_){ // [eval] a10: invalid value 0 (out of bound >=1): // ./in.cue:12:10 // ./in.cue:12:6 } b1: (number){ &(>=1, <=5) } b2: (number){ 1 } b3: (number){ 5 } b4: (number){ &(>=2, <=3) } b5: (number){ &(>=3, <=5) } b6: (number){ 5 } b7: (_|_){ // [eval] b7: incompatible bounds >=6 and <=5: // ./in.cue:21:11 // ./in.cue:21:17 } b8: (number){ &(>=1, <=5) } b9: (number){ 1 } b10: (number){ 5 } b11: (number){ &(>=2, <=3) } b12: (number){ &(>=3, <=5) } b13: (number){ 5 } b14: (_|_){ // [eval] b14: incompatible bounds >=6 and <=5: // ./in.cue:29:6 // ./in.cue:29:24 } c1: (int){ &(>=1, <=5, int) } c2: (int){ &(>=1, <=5, int) } c3: (_|_){ // [eval] c3: conflicting values string and >=1 (mismatched types string and number): // ./in.cue:34:5 // ./in.cue:34:14 } c4: (_|_){ // [eval] c4: conflicting values >=1 and string (mismatched types number and string): // ./in.cue:35:5 // ./in.cue:35:17 } s1: (string){ "e" } s2: (string){ "ee" } n1: (number){ &(>=1, <=2) } n2: (_|_){ // [eval] n2: incompatible bounds >=1.1 and <=1.3: // ./in.cue:42:11 // ./in.cue:42:19 } n3: (int){ 2 } n4: (float){ 0.09999 } n5: (float){ 2.5 } }