cuelang.org/go@v0.10.1/cue/testdata/comprehensions/lists.txtar (about)

     1  -- in.cue --
     2  a: [{a: 1}, {b: 2 & 3}]
     3  
     4  b: [for x in a {x}]
     5  -- out/eval/stats --
     6  Leaks:  0
     7  Freed:  7
     8  Reused: 3
     9  Allocs: 4
    10  Retain: 0
    11  
    12  Unifications: 7
    13  Conjuncts:    8
    14  Disjuncts:    7
    15  -- out/eval --
    16  Errors:
    17  a.1.b: conflicting values 3 and 2:
    18      ./in.cue:1:17
    19      ./in.cue:1:21
    20  
    21  Result:
    22  (_|_){
    23    // [eval]
    24    a: (_|_){
    25      // [eval]
    26      0: (struct){
    27        a: (int){ 1 }
    28      }
    29      1: (_|_){
    30        // [eval]
    31        b: (_|_){
    32          // [eval] a.1.b: conflicting values 3 and 2:
    33          //     ./in.cue:1:17
    34          //     ./in.cue:1:21
    35        }
    36      }
    37    }
    38    b: (_|_){
    39      // [eval] a.1.b: conflicting values 3 and 2:
    40      //     ./in.cue:1:17
    41      //     ./in.cue:1:21
    42    }
    43  }
    44  -- out/compile --
    45  --- in.cue
    46  {
    47    a: [
    48      {
    49        a: 1
    50      },
    51      {
    52        b: (2 & 3)
    53      },
    54    ]
    55    b: [
    56      for _, x in 怈1;a怉 {
    57        怈1;x怉
    58      },
    59    ]
    60  }