Add spread concept code

This commit is contained in:
Andrew Morris
2023-05-30 10:32:40 +10:00
parent 2267226d6b
commit 008de5cab1
2 changed files with 13 additions and 0 deletions

7
concept-code/spread.vsm Normal file
View File

@@ -0,0 +1,7 @@
export @_anon0 {}
@_anon0 = function() {
mov ["a", "b", "c"] %middle
cat [["."], %middle, ["."]] %_tmp0
mov %_tmp0 %return
}

6
inputs/failing/spread.ts Normal file
View File

@@ -0,0 +1,6 @@
// // test_output! [".","a","b","c","."]
export default function () {
const middle = ["a", "b", "c"];
return [".", ...middle, "."];
}