cuelang.org/go@v0.10.1/cue/testdata/references/optional.txtar (about)

     1  -- in.cue --
     2  a: {
     3  	foo?: int
     4  
     5  	b: foo
     6  }
     7  -- out/compile --
     8  --- in.cue
     9  {
    10    a: {
    11      foo?: int
    12      b: 〈0;foo〉
    13    }
    14  }
    15  -- out/eval/stats --
    16  Leaks:  0
    17  Freed:  4
    18  Reused: 1
    19  Allocs: 3
    20  Retain: 0
    21  
    22  Unifications: 4
    23  Conjuncts:    4
    24  Disjuncts:    4
    25  -- out/eval --
    26  (struct){
    27    a: (struct){
    28      foo?: (int){ int }
    29      b: (_|_){
    30        // [incomplete] a.b: cannot reference optional field: foo:
    31        //     ./in.cue:4:5
    32      }
    33    }
    34  }