...

Text file src/cuelang.org/go/cue/testdata/fulleval/028_slice_rewrite_bug.txtar

Documentation: cuelang.org/go/cue/testdata/fulleval

     1# DO NOT EDIT; generated by go run testdata/gen.go
     2#
     3#name: slice rewrite bug
     4#evalFull
     5-- in.cue --
     6fn: {
     7	arg: [...int] & [1]
     8	out: arg[1:]
     9}
    10fn1: fn & {arg: [1]}
    11-- out/def --
    12fn: {
    13	arg: [1]
    14	out: []
    15}
    16fn1: fn & {
    17	arg: [1]
    18}
    19-- out/export --
    20fn: {
    21	arg: [1]
    22	out: []
    23}
    24fn1: {
    25	arg: [1]
    26	out: []
    27}
    28-- out/yaml --
    29fn:
    30  arg:
    31  - 1
    32  out: []
    33fn1:
    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/stats --
    59Leaks:  0
    60Freed:  9
    61Reused: 5
    62Allocs: 4
    63Retain: 0
    64
    65Unifications: 9
    66Conjuncts:    17
    67Disjuncts:    9
    68-- out/eval --
    69(struct){
    70  fn: (struct){
    71    arg: (#list){
    72      0: (int){ 1 }
    73    }
    74    out: (#list){
    75    }
    76  }
    77  fn1: (struct){
    78    arg: (#list){
    79      0: (int){ 1 }
    80    }
    81    out: (#list){
    82    }
    83  }
    84}

View as plain text