cuelang.org/go@v0.13.0/cue/testdata/comprehensions/045_comprehension_and_skipped_field.txtar (about) 1 #name: comprehension and skipped field 2 #bug: true 3 #evalFull 4 -- in.cue -- 5 6 for key, value in {x: v: 1} { 7 "\(key)": { 8 v: *{for pod, _ in value.v {}} | {"\(value.v)": 2} 9 _p: 3 10 } 11 } 12 -- out/def -- 13 x: { 14 v: { 15 "1": 2 16 } 17 _p: 3 18 } 19 -- out/export -- 20 x: { 21 v: { 22 "1": 2 23 } 24 } 25 -- out/yaml -- 26 x: 27 v: 28 "1": 2 29 -- out/json -- 30 -- out/legacy-debug -- 31 <0>{x: <1>{v: <2>{"1": 2}, _p: 3}} 32 -- out/compile -- 33 --- in.cue 34 { 35 for key, value in { 36 x: { 37 v: 1 38 } 39 } { 40 "\(〈1;key〉)": { 41 v: (*{ 42 for pod, _ in 〈3;value〉.v {} 43 }|{ 44 "\(〈3;value〉.v)": 2 45 }) 46 _p: 3 47 } 48 } 49 } 50 -- out/eval/stats -- 51 Leaks: 3 52 Freed: 7 53 Reused: 2 54 Allocs: 8 55 Retain: 7 56 57 Unifications: 8 58 Conjuncts: 11 59 Disjuncts: 12 60 -- out/eval -- 61 (struct){ 62 x: (struct){ 63 v: (struct){ 64 "1": (int){ 2 } 65 } 66 _p: (int){ 3 } 67 } 68 }