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

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