cuelang.org/go@v0.10.1/cue/testdata/resolve/010_optional_field_resolves_to_incomplete.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: optional field resolves to incomplete
     4  #evalPartial
     5  -- in.cue --
     6  r: {
     7  	a?: 3
     8  	b:  a
     9  	c:  r["a"]
    10  }
    11  -- out/def --
    12  r: {
    13  	a?: 3
    14  	b:  a
    15  	c:  r["a"]
    16  }
    17  -- out/legacy-debug --
    18  <0>{r: <1>{a?: 3, b: <2>.a, c: <3>.r["a"]}}
    19  -- out/compile --
    20  --- in.cue
    21  {
    22    r: {
    23      a?: 3
    24      b: 〈0;a〉
    25      c: 〈1;r〉["a"]
    26    }
    27  }
    28  -- out/eval/stats --
    29  Leaks:  0
    30  Freed:  5
    31  Reused: 2
    32  Allocs: 3
    33  Retain: 0
    34  
    35  Unifications: 5
    36  Conjuncts:    5
    37  Disjuncts:    5
    38  -- out/eval --
    39  (struct){
    40    r: (struct){
    41      a?: (int){ 3 }
    42      b: (_|_){
    43        // [incomplete] r.b: cannot reference optional field: a:
    44        //     ./in.cue:3:6
    45      }
    46      c: (_|_){
    47        // [incomplete] r.c: cannot reference optional field: a:
    48        //     ./in.cue:4:8
    49      }
    50    }
    51  }