Implements struct initializers

This commit is contained in:
nub31
2025-01-31 22:47:55 +01:00
parent ee640ae7a8
commit 16a031823e
11 changed files with 221 additions and 52 deletions

View File

@@ -1,6 +1,19 @@
import "core";
func main() {
let x = new Test
{
some_string = "test2",
some_int = 69,
};
}
struct Test {
let some_string: String;
let some_int: int64;
}
func example() {
let some_string = "test";
println(some_string);
@@ -17,4 +30,4 @@ func main() {
println(some_array[i]);
i = i + 1;
}
}
}