diff --git a/README.md b/README.md index ef23342..00d2ee1 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ Smaller features: - Easier way to initialize arrays with a single value - Lexical scopes for Debug Information - ~~Only include standard library at all if it is imported~~ +- Void-returns (`return;` for void-returning functions) ### Why "Reid" diff --git a/reid_src/array_structs.reid b/reid_src/array_structs.reid index 7203d03..3ffdc77 100644 --- a/reid_src/array_structs.reid +++ b/reid_src/array_structs.reid @@ -16,9 +16,9 @@ fn test() -> Test { fn main() -> u32 { let mut value = test(); - let mut a = value.second; + let mut a = &mut value; - a[2] = 15; + *a.second[2] = 15; return value.second[2]; diff --git a/reid_src/hello_world.reid b/reid_src/hello_world.reid index 89c62f7..aedbe0e 100644 --- a/reid_src/hello_world.reid +++ b/reid_src/hello_world.reid @@ -1,7 +1,8 @@ import std::print; fn main() -> i32 { - print("hello world"); + let test = "hello world"; + print(test); return 0; }