leo/tests/compiler/array/spread.leo
2021-04-19 18:08:14 -07:00

7 lines
184 B
Plaintext

// A spread operator `...` copies the elements of one array into another
function main(a: [u8; 3]) {
const b = [1u8, 1u8];
const c = [1u8, ...b];
console.assert(a == c);
}