| # DO NOT EDIT; generated by go run testdata/gen.go |
| # |
| #name: slice rewrite bug |
| #evalFull |
| -- in.cue -- |
| fn: { |
| arg: [...int] & [1] |
| out: arg[1:] |
| } |
| fn1: fn & {arg: [1]} |
| -- out/def -- |
| fn: { |
| arg: [1] |
| out: [] |
| } |
| fn1: fn & { |
| arg: [1] |
| } |
| -- out/export -- |
| fn: { |
| arg: [1] |
| out: [] |
| } |
| fn1: { |
| arg: [1] |
| out: [] |
| } |
| -- out/yaml -- |
| fn: |
| arg: |
| - 1 |
| out: [] |
| fn1: |
| arg: |
| - 1 |
| out: [] |
| -- out/json -- |
| {"fn":{"arg":[1],"out":[]},"fn1":{"arg":[1],"out":[]}} |
| -- out/legacy-debug -- |
| <0>{fn: <1>{arg: [1], out: []}, fn1: <2>{arg: [1], out: []}} |
| -- out/compile -- |
| --- in.cue |
| { |
| fn: { |
| arg: ([ |
| ...int, |
| ] & [ |
| 1, |
| ]) |
| out: 〈0;arg〉[1:] |
| } |
| fn1: (〈0;fn〉 & { |
| arg: [ |
| 1, |
| ] |
| }) |
| } |
| -- out/eval -- |
| (struct){ |
| fn: (struct){ |
| arg: (#list){ |
| 0: (int){ 1 } |
| } |
| out: (#list){ |
| } |
| } |
| fn1: (struct){ |
| arg: (#list){ |
| 0: (int){ 1 } |
| } |
| out: (#list){ |
| } |
| } |
| } |