cuelang.org/go@v0.13.0/cue/testdata/fulleval/053_issue312.txtar (about)

     1  #name: issue312
     2  #evalFull
     3  -- in.cue --
     4  
     5  for x in [1] {
     6  	*close({}) | {[_]: null}
     7  }
     8  -- out/def --
     9  
    10  for x in [1] *close({}) | {
    11  	[string]: null
    12  }
    13  -- out/export --
    14  
    15  -- out/yaml --
    16  {}
    17  -- out/json --
    18  {}
    19  -- out/legacy-debug --
    20  <0>{ <1>for _, x in [1] yield <2>{}, (*close (<3>{}) | <4>{[]: <5>(_: string)->null, })}
    21  -- out/eval/stats --
    22  Leaks:  2
    23  Freed:  3
    24  Reused: 0
    25  Allocs: 5
    26  Retain: 2
    27  
    28  Unifications: 3
    29  Conjuncts:    8
    30  Disjuncts:    5
    31  -- out/eval --
    32  (struct){ |(*(#struct){
    33    }, (struct){
    34    }) }
    35  -- out/compile --
    36  --- in.cue
    37  {
    38    for _, x in [
    39      1,
    40    ] {
    41      (*close({})|{
    42        [_]: null
    43      })
    44    }
    45  }