cuelang.org/go@v0.13.0/cue/testdata/export/025.txtar (about)

     1  raw: true
     2  eval: true
     3  -- in.cue --
     4  {
     5  	b: [{
     6  		{[X=_]: int}
     7  		if a > 4 {
     8  			f: 4
     9  		}
    10  	}][a]
    11  	a: int
    12  	c: *1 | 2
    13  }
    14  -- out/def --
    15  b: [{
    16  	if a > 4 {
    17  		f: 4
    18  	}
    19  	{[X=string]: int}
    20  }][a]
    21  a: int
    22  c: *1 | 2
    23  -- out/compile --
    24  --- in.cue
    25  {
    26    {
    27      b: [
    28        {
    29          {
    30            [_]: int
    31          }
    32          if (怈2;a怉 > 4) {
    33            f: 4
    34          }
    35        },
    36      ][怈0;a怉]
    37      a: int
    38      c: (*1|2)
    39    }
    40  }
    41  -- out/eval/stats --
    42  Leaks:  5
    43  Freed:  6
    44  Reused: 2
    45  Allocs: 9
    46  Retain: 10
    47  
    48  Unifications: 9
    49  Conjuncts:    16
    50  Disjuncts:    16
    51  -- out/eval --
    52  (struct){
    53    b: (_|_){
    54      // [incomplete] b: invalid non-ground value int (must be concrete int):
    55      //     ./in.cue:8:5
    56    }
    57    a: (int){ int }
    58    c: (int){ |(*(int){ 1 }, (int){ 2 }) }
    59  }