cuelang.org/go@v0.10.1/cue/testdata/resolve/006_arithmetic.txtar (about) 1 # DO NOT EDIT; generated by go run testdata/gen.go 2 # 3 #name: arithmetic 4 #evalPartial 5 -- in.cue -- 6 v1: 1.0T / 2.0 7 v2: 2.0 == 2 8 n1: 1 9 v5: 2.0 / n1 10 v6: 1.0 / 1.0 11 e2: int & 4.0/2.0 12 -- out/def -- 13 v1: 5.0000000000e+11 14 v2: true 15 n1: 1 16 v5: 2.0 17 v6: 1. 18 e2: _|_ // conflicting values int and (4.0 / 2.0) (mismatched types int and float) 19 -- out/legacy-debug -- 20 <0>{v1: 5.0000000000e+11, v2: true, n1: 1, v5: 2.0, v6: 1., e2: _|_((int & (4.0 / 2.0)):conflicting values int and (4.0 / 2.0) (mismatched types int and float))} 21 -- out/compile -- 22 --- in.cue 23 { 24 v1: (1000000000000 / 2.0) 25 v2: (2.0 == 2) 26 n1: 1 27 v5: (2.0 / 〈0;n1〉) 28 v6: (1.0 / 1.0) 29 e2: (int & (4.0 / 2.0)) 30 } 31 -- out/eval/stats -- 32 Leaks: 0 33 Freed: 7 34 Reused: 5 35 Allocs: 2 36 Retain: 0 37 38 Unifications: 7 39 Conjuncts: 8 40 Disjuncts: 7 41 -- out/eval -- 42 Errors: 43 e2: conflicting values int and 2.0 (mismatched types int and float): 44 ./in.cue:6:5 45 ./in.cue:6:11 46 47 Result: 48 (_|_){ 49 // [eval] 50 v1: (float){ 5.0E+11 } 51 v2: (bool){ true } 52 n1: (int){ 1 } 53 v5: (float){ 2.0 } 54 v6: (float){ 1.0 } 55 e2: (_|_){ 56 // [eval] e2: conflicting values int and 2.0 (mismatched types int and float): 57 // ./in.cue:6:5 58 // ./in.cue:6:11 59 } 60 }