cuelang.org/go@v0.10.1/cue/testdata/comprehensions/incomplete.txtar (about) 1 -- in.cue -- 2 cond: bool 3 src: {} 4 top: _ 5 a: [ if cond {}] 6 b: [for x in src.foo {}] 7 c: {for x in top {}} 8 -- out/eval/stats -- 9 Leaks: 0 10 Freed: 7 11 Reused: 5 12 Allocs: 2 13 Retain: 0 14 15 Unifications: 7 16 Conjuncts: 7 17 Disjuncts: 7 18 -- out/eval -- 19 (struct){ 20 cond: (bool){ bool } 21 src: (struct){ 22 } 23 top: (_){ _ } 24 a: (_|_){ 25 // [incomplete] a: incomplete bool: bool: 26 // ./in.cue:1:7 27 } 28 b: (_|_){ 29 // [incomplete] b: undefined field: foo: 30 // ./in.cue:5:18 31 } 32 c: (_|_){ 33 // [incomplete] c: cannot range over top (incomplete type _): 34 // ./in.cue:6:14 35 } 36 } 37 -- out/compile -- 38 --- in.cue 39 { 40 cond: bool 41 src: {} 42 top: _ 43 a: [ 44 if 〈1;cond〉 {}, 45 ] 46 b: [ 47 for _, x in 〈1;src〉.foo {}, 48 ] 49 c: { 50 for _, x in 〈1;top〉 {} 51 } 52 }