cuelang.org/go@v0.13.0/cue/testdata/basicrewrite/015_types.txtar (about) 1 #name: types 2 #evalPartial 3 -- in.cue -- 4 i: int 5 j: int & 3 6 s: string 7 t: "s" & string 8 e: int & string 9 e2: 1 & string 10 b: !int 11 p: +true 12 m: -false 13 -- out/def -- 14 i: int 15 j: 3 16 s: string 17 t: "s" 18 e: _|_ // conflicting values int and string (mismatched types int and string) 19 e2: _|_ // conflicting values 1 and string (mismatched types int and string) 20 b: _|_ // invalid operation !int (! int) 21 p: _|_ // invalid operation +true (+ bool) 22 m: _|_ // invalid operation -false (- bool) 23 -- out/legacy-debug -- 24 <0>{i: int, j: 3, s: string, t: "s", e: _|_((int & string):conflicting values int and string (mismatched types int and string)), e2: _|_((1 & string):conflicting values 1 and string (mismatched types int and string)), b: _|_(!int:invalid operation !int (! int)), p: _|_(+true:invalid operation +true (+ bool)), m: _|_(-false:invalid operation -false (- bool))} 25 -- out/compile -- 26 --- in.cue 27 { 28 i: int 29 j: (int & 3) 30 s: string 31 t: ("s" & string) 32 e: (int & string) 33 e2: (1 & string) 34 b: !int 35 p: +true 36 m: -false 37 } 38 -- out/eval/stats -- 39 Leaks: 0 40 Freed: 10 41 Reused: 8 42 Allocs: 2 43 Retain: 0 44 45 Unifications: 10 46 Conjuncts: 14 47 Disjuncts: 10 48 -- out/eval -- 49 Errors: 50 b: invalid operand int ('!' requires concrete value): 51 ./in.cue:7:6 52 e: conflicting values int and string (mismatched types int and string): 53 ./in.cue:5:5 54 ./in.cue:5:11 55 e2: conflicting values 1 and string (mismatched types int and string): 56 ./in.cue:6:5 57 ./in.cue:6:9 58 p: invalid operation +true (+ bool): 59 ./in.cue:8:5 60 m: invalid operation -false (- bool): 61 ./in.cue:9:5 62 63 Result: 64 (_|_){ 65 // [eval] 66 i: (int){ int } 67 j: (int){ 3 } 68 s: (string){ string } 69 t: (string){ "s" } 70 e: (_|_){ 71 // [eval] e: conflicting values int and string (mismatched types int and string): 72 // ./in.cue:5:5 73 // ./in.cue:5:11 74 } 75 e2: (_|_){ 76 // [eval] e2: conflicting values 1 and string (mismatched types int and string): 77 // ./in.cue:6:5 78 // ./in.cue:6:9 79 } 80 b: (_|_){ 81 // [eval] b: invalid operand int ('!' requires concrete value): 82 // ./in.cue:7:6 83 } 84 p: (_|_){ 85 // [eval] p: invalid operation +true (+ bool): 86 // ./in.cue:8:5 87 } 88 m: (_|_){ 89 // [eval] m: invalid operation -false (- bool): 90 // ./in.cue:9:5 91 } 92 }