From d4616ea02576f8131c9ed842108283a8553b6382 Mon Sep 17 00:00:00 2001 From: sofia Date: Wed, 16 Jul 2025 21:17:28 +0300 Subject: [PATCH] Add array_structs.reid to test arrays and structs together --- reid_src/array_structs.reid | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 reid_src/array_structs.reid diff --git a/reid_src/array_structs.reid b/reid_src/array_structs.reid new file mode 100644 index 0000000..179c7fa --- /dev/null +++ b/reid_src/array_structs.reid @@ -0,0 +1,17 @@ +// Arithmetic, function calls and imports! + +struct Test { + field: i32, + second: [u32; 4] +} + +fn main() -> u32 { + let mut value = [Test { + field: 5, + second: [6, 3, 17, 8], + }]; + + value[0].second[2] = 99; + + return value[0].second[2]; +}