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