...
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user