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