leo/asg/tests/pass/array/spread.leo

7 lines
180 B
Plaintext
Raw Normal View History

2021-01-25 18:17:42 +03:00
// A spread operator `...` copies the elements of one array into another
function main(a: [u8; 3]) {
let b = [1u8, 1u8];
let c = [1u8, ...b];
console.assert(a == c);
}