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

     1  // Sometimes an arc should not "Finalize" itself. See Issue #2171 in eval.go.
     2  -- in.cue --
     3  package x
     4  
     5  do: {
     6  	hello: {
     7  	}
     8  }
     9  
    10  for k, v in do {do: (k): v}
    11  -- out/compile --
    12  --- in.cue
    13  {
    14    do: {
    15      hello: {}
    16    }
    17    for k, v in 〈0;do〉 {
    18      do: {
    19        〈2;k〉: 〈2;v〉
    20      }
    21    }
    22  }
    23  -- out/eval/stats --
    24  Leaks:  0
    25  Freed:  3
    26  Reused: 0
    27  Allocs: 3
    28  Retain: 0
    29  
    30  Unifications: 3
    31  Conjuncts:    5
    32  Disjuncts:    3
    33  -- out/eval --
    34  (struct){
    35    do: (struct){
    36      hello: (struct){
    37      }
    38    }
    39  }