cuelang.org/go@v0.13.0/internal/core/export/testdata/selfcontained/splitcomprehension.txtar (about)

     1  #path: a.b
     2  
     3  // TODO: merge output structs.
     4  
     5  -- in.cue --
     6  for key, value in { test: 1 } {
     7  	("a"): b: k1: key
     8  	("a"): b: v1: value
     9  	a: b: k2: key
    10  	a: b: v2: value
    11  }
    12  a: {
    13  	for key, value in { test: 1 } {
    14  		("b"): k3: key
    15  		("b"): v3: value
    16  		b: k4: key
    17  		b: v4: value
    18  	}
    19  	b: {}
    20  }
    21  -- out/self/default --
    22  
    23  {
    24  	k2: "test"
    25  } & {
    26  	v2: 1
    27  } & {
    28  	k4: "test"
    29  } & {
    30  	v4: 1
    31  } & {
    32  	k1: "test"
    33  	v1: 1
    34  	k3: "test"
    35  	v3: 1
    36  }