leo/tests/compiler/array/slice.leo

12 lines
239 B
Plaintext
Raw Normal View History

2021-05-05 21:25:24 +03:00
/*
namespace: Compile
expectation: Pass
input_file: input/three_ones.in
*/
// `{from}..{to}` copies the elements of one array into another exclusively
2021-05-05 21:25:24 +03:00
function main(a: [u8; 3]) -> bool {
const b = [1u8; 4];
2021-05-05 21:25:24 +03:00
return a == b[0..3];
}