github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/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 -- 9 (struct){ 10 cond: (bool){ bool } 11 src: (struct){ 12 } 13 top: (_){ _ } 14 a: (_|_){ 15 // [incomplete] a: incomplete bool: bool: 16 // ./in.cue:1:7 17 } 18 b: (_|_){ 19 // [incomplete] b: undefined field: foo: 20 // ./in.cue:5:19 21 } 22 c: (_|_){ 23 // [incomplete] c: cannot range over top (incomplete type _): 24 // ./in.cue:6:14 25 } 26 } 27 -- out/compile -- 28 --- in.cue 29 { 30 cond: bool 31 src: {} 32 top: _ 33 a: [ 34 if 〈1;cond〉 {}, 35 ] 36 b: [ 37 for _, x in 〈1;src〉.foo {}, 38 ] 39 c: { 40 for _, x in 〈1;top〉 {} 41 } 42 }