cuelang.org/go@v0.13.0/cue/testdata/fulleval/041.txtar (about)

     1  #evalFull
     2  -- in.cue --
     3  t: {
     4  	#ok: *true | bool
     5  	if #ok {
     6  		x: int
     7  	}
     8  }
     9  s: t & {
    10  	#ok: false
    11  }
    12  -- out/def --
    13  t: {
    14  	x:   int
    15  	#ok: *true | bool
    16  }
    17  s: t & {
    18  	#ok: false
    19  }
    20  -- out/legacy-debug --
    21  <0>{t: <1>{x: int, #ok: true}, s: <2>{#ok: false}}
    22  -- out/compile --
    23  --- in.cue
    24  {
    25    t: {
    26      #ok: (*true|bool)
    27      if 〈0;#ok〉 {
    28        x: int
    29      }
    30    }
    31    s: (〈0;t〉 & {
    32      #ok: false
    33    })
    34  }
    35  -- out/eval/stats --
    36  Leaks:  0
    37  Freed:  11
    38  Reused: 6
    39  Allocs: 5
    40  Retain: 0
    41  
    42  Unifications: 7
    43  Conjuncts:    13
    44  Disjuncts:    11
    45  -- out/eval --
    46  (struct){
    47    t: (struct){
    48      #ok: (bool){ |(*(bool){ true }, (bool){ bool }) }
    49      x: (int){ int }
    50    }
    51    s: (struct){
    52      #ok: (bool){ false }
    53    }
    54  }