leo/tests/compiler/mutability/array_splice_mut.leo

15 lines
239 B
Plaintext
Raw Normal View History

2021-05-03 17:28:53 +03:00
/*
namespace: Compile
expectation: Pass
2021-05-05 18:29:44 +03:00
input_file: input/dummy.in
2021-05-03 17:28:53 +03:00
*/
2021-05-05 18:29:44 +03:00
function main() -> bool {
let a = [1u32, 2u32, 3u32];
2020-12-11 22:21:46 +03:00
a[0u32..2u32] = [4u32, 5u32];
2021-05-05 18:29:44 +03:00
return a[0] == 4u32
&& a[1] == 5u32
&& a[2] == 3u32;
}