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

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