Add array_structs.reid to test arrays and structs together
This commit is contained in:
parent
79c98a18f7
commit
d4616ea025
17
reid_src/array_structs.reid
Normal file
17
reid_src/array_structs.reid
Normal file
@ -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];
|
||||
}
|
Loading…
Reference in New Issue
Block a user