cuelang.org/go@v0.13.0/cue/testdata/basicrewrite/017_null.txtar (about) 1 #name: null 2 #evalPartial 3 -- in.cue -- 4 eql: null == null 5 neq: null != null 6 unf: null & null 7 8 // errors 9 eq1: null == 1 10 eq2: 1 == null 11 ne1: "s" != null 12 call: null() 13 -- out/def -- 14 eql: true 15 neq: false 16 unf: null 17 18 // errors 19 eq1: false 20 eq2: false 21 ne1: true 22 call: _|_ // cannot call non-function null (type null) 23 -- out/legacy-debug -- 24 <0>{eql: true, neq: false, unf: null, eq1: false, eq2: false, ne1: true, call: _|_(null:cannot call non-function null (type null))} 25 -- out/compile -- 26 --- in.cue 27 { 28 eql: (null == null) 29 neq: (null != null) 30 unf: (null & null) 31 eq1: (null == 1) 32 eq2: (1 == null) 33 ne1: ("s" != null) 34 call: null() 35 } 36 -- out/eval/stats -- 37 Leaks: 0 38 Freed: 8 39 Reused: 6 40 Allocs: 2 41 Retain: 0 42 43 Unifications: 8 44 Conjuncts: 9 45 Disjuncts: 8 46 -- out/eval -- 47 Errors: 48 call: cannot call non-function null (type null): 49 ./in.cue:9:7 50 51 Result: 52 (_|_){ 53 // [eval] 54 eql: (bool){ true } 55 neq: (bool){ false } 56 unf: (null){ null } 57 eq1: (bool){ false } 58 eq2: (bool){ false } 59 ne1: (bool){ true } 60 call: (_|_){ 61 // [eval] call: cannot call non-function null (type null): 62 // ./in.cue:9:7 63 } 64 }