This commit is contained in:
nub31
2025-07-03 18:29:33 +02:00
parent 598e0f35db
commit 7c08297946
2 changed files with 50 additions and 38 deletions

View File

@@ -1,8 +1,13 @@
namespace main
struct Name {
first: cstring
last: cstring
}
struct Human
{
name: cstring
name: Name
age: i64
}
@@ -11,11 +16,14 @@ export func main(args: []cstring): i64
let x: Human
x = alloc Human {
name = "john"
name = alloc Name {
first = "john"
last = "doe"
}
age = 23
}
c::puts(x.name)
c::puts(x.name.last)
return 0
}