cuelang.org/go@v0.10.1/cue/testdata/resolve/014_null_coalescing.txtar (about) 1 # DO NOT EDIT; generated by go run testdata/gen.go 2 # 3 #name: null coalescing 4 #evalPartial 5 -- in.cue -- 6 a: null 7 b: a.x | "b" 8 c: a["x"] | "c" 9 -- out/def -- 10 a: null 11 b: "b" 12 c: "c" 13 -- out/export -- 14 a: null 15 b: "b" 16 c: "c" 17 -- out/yaml -- 18 a: null 19 b: b 20 c: c 21 -- out/json -- 22 {"a":null,"b":"b","c":"c"} 23 -- out/legacy-debug -- 24 <0>{a: null, b: "b", c: "c"} 25 -- out/compile -- 26 --- in.cue 27 { 28 a: null 29 b: (ć0;ać.x|"b") 30 c: (ć0;ać["x"]|"c") 31 } 32 -- out/eval/stats -- 33 Leaks: 0 34 Freed: 8 35 Reused: 5 36 Allocs: 3 37 Retain: 0 38 39 Unifications: 4 40 Conjuncts: 8 41 Disjuncts: 8 42 -- out/eval -- 43 (struct){ 44 a: (null){ null } 45 b: (string){ "b" } 46 c: (string){ "c" } 47 }