...
This commit is contained in:
2
example/.gitignore
vendored
2
example/.gitignore
vendored
@@ -1,2 +1,2 @@
|
||||
build
|
||||
.build
|
||||
out
|
||||
@@ -1,34 +1,15 @@
|
||||
// c
|
||||
module main
|
||||
|
||||
extern func puts(text: cstring)
|
||||
|
||||
struct Name
|
||||
struct Test
|
||||
{
|
||||
first: cstring
|
||||
last: cstring
|
||||
}
|
||||
|
||||
struct Human
|
||||
{
|
||||
name: Name
|
||||
age: cstring
|
||||
|
||||
}
|
||||
|
||||
func main(args: []cstring): i64
|
||||
{
|
||||
let x: Human = {
|
||||
name = {
|
||||
first = "bob"
|
||||
last = "the builder"
|
||||
}
|
||||
age = "23"
|
||||
}
|
||||
|
||||
puts(x.age)
|
||||
puts("test")
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// func test(human: ^Human)
|
||||
// {
|
||||
// puts(human^.name.last)
|
||||
// }
|
||||
Reference in New Issue
Block a user