github.com/solo-io/cue@v0.4.7/cue/testdata/fulleval/006_referencing_field_in_field_comprehension.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: referencing field in field comprehension
     4  #evalFull
     5  -- in.cue --
     6  a: {b: c: 4}
     7  a: {
     8  	b: d: 5
     9  	for k, v in b {
    10  		"\(k)": v
    11  	}
    12  }
    13  -- out/def --
    14  a: {
    15  	b: {
    16  		c: 4
    17  		d: 5
    18  	}
    19  	c: 4
    20  	d: 5
    21  }
    22  -- out/export --
    23  a: {
    24  	b: {
    25  		c: 4
    26  		d: 5
    27  	}
    28  	c: 4
    29  	d: 5
    30  }
    31  -- out/yaml --
    32  a:
    33    b:
    34      c: 4
    35      d: 5
    36    c: 4
    37    d: 5
    38  -- out/json --
    39  {"a":{"b":{"c":4,"d":5},"c":4,"d":5}}
    40  -- out/legacy-debug --
    41  <0>{a: <1>{b: <2>{c: 4, d: 5}, c: 4, d: 5}}
    42  -- out/compile --
    43  --- in.cue
    44  {
    45    a: {
    46      b: {
    47        c: 4
    48      }
    49    }
    50    a: {
    51      b: {
    52        d: 5
    53      }
    54      for k, v in 〈0;b〉 {
    55        "\(〈1;k〉)": 〈1;v〉
    56      }
    57    }
    58  }
    59  -- out/eval --
    60  (struct){
    61    a: (struct){
    62      b: (struct){
    63        c: (int){ 4 }
    64        d: (int){ 5 }
    65      }
    66      c: (int){ 4 }
    67      d: (int){ 5 }
    68    }
    69  }