This commit is contained in:
nub31
2025-10-26 22:28:48 +01:00
parent 27bc4da4fd
commit 560e6428ff
18 changed files with 663 additions and 483 deletions

View File

@@ -2,17 +2,34 @@ module main
extern "puts" func puts(text: ^i8)
struct Name
{
first: ^i8
last: ^i8
}
struct Human
{
age: u64
name: ^i8
name: &Name
}
extern "main" func main(argc: i64, argv: [?]^i8): i64
{
let x: &Human = {
age = 23
name = "test"
name = {
first = "oliver"
last = "stene"
}
}
let z: Human = {
age = 23
name = {
first = "oliver"
last = "stene"
}
}
test(x)
@@ -22,6 +39,7 @@ extern "main" func main(argc: i64, argv: [?]^i8): i64
return 0
}
func test(x: &Human)
func test(x: &Human): &Human
{
return x
}