cuelang.org/go@v0.13.0/cue/testdata/resolve/024_structs.txtar (about)

     1  #name: structs
     2  #evalPartial
     3  -- in.cue --
     4  a: t & {c:  5} // {c:5,d:15}
     5  b: ti & {c: 7} // {c:7,d:21}
     6  t: {c: number, d: c * 3} // {c:number,d:number*3}
     7  ti: t & {c: int}
     8  -- out/def --
     9  a: t & {
    10  	c: 5
    11  }
    12  t: {
    13  	c: number
    14  	d: c * 3
    15  }
    16  b: ti & {
    17  	c: 7
    18  }
    19  ti: t & {
    20  	c: int
    21  }
    22  -- out/legacy-debug --
    23  <0>{a: <1>{c: 5, d: 15}, t: <2>{c: number, d: (<3>.c * 3)}, b: <4>{c: 7, d: 21}, ti: <5>{c: int, d: (<6>.c * 3)}}
    24  -- out/compile --
    25  --- in.cue
    26  {
    27    a: (〈0;t〉 & {
    28      c: 5
    29    })
    30    b: (〈0;ti〉 & {
    31      c: 7
    32    })
    33    t: {
    34      c: number
    35      d: (〈0;c〉 * 3)
    36    }
    37    ti: (〈0;t〉 & {
    38      c: int
    39    })
    40  }
    41  -- out/eval/stats --
    42  Leaks:  0
    43  Freed:  13
    44  Reused: 9
    45  Allocs: 4
    46  Retain: 2
    47  
    48  Unifications: 13
    49  Conjuncts:    33
    50  Disjuncts:    15
    51  -- out/eval --
    52  (struct){
    53    a: (struct){
    54      c: (int){ 5 }
    55      d: (int){ 15 }
    56    }
    57    b: (struct){
    58      c: (int){ 7 }
    59      d: (int){ 21 }
    60    }
    61    t: (struct){
    62      c: (number){ number }
    63      d: (_|_){
    64        // [incomplete] t.d: non-concrete value number in operand to *:
    65        //     ./in.cue:3:19
    66        //     ./in.cue:3:8
    67      }
    68    }
    69    ti: (struct){
    70      c: (int){ int }
    71      d: (_|_){
    72        // [incomplete] ti.d: non-concrete value int in operand to *:
    73        //     ./in.cue:3:19
    74        //     ./in.cue:3:8
    75        //     ./in.cue:4:13
    76      }
    77    }
    78  }