reid-llvm/examples/array_structs.reid
2025-07-23 17:52:28 +03:00

25 lines
337 B
Plaintext

// Arithmetic, function calls and imports!
struct Test {
field: i32,
second: [u32; 4],
}
fn test() -> Test {
let value = Test {
field: 5,
second: [6, 3, 4, 8],
};
return value;
}
fn main() -> u32 {
let mut value = test();
let mut a = &mut value;
let test = *a.field;
return 0;
}