leo/compiler/tests/array/slice.leo

7 lines
161 B
Plaintext
Raw Normal View History

// `{from}..{to}` copies the elements of one array into another exclusively
2020-07-30 10:56:17 +03:00
function main(a: u8[3]) {
let b = [1u8; 4];
2020-08-17 03:20:47 +03:00
console.assert(a == b[0..3]);
}