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

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