Array type works with args
This commit is contained in:
@@ -1,23 +1,10 @@
|
||||
import c
|
||||
|
||||
struct Test {
|
||||
name: ^string
|
||||
}
|
||||
|
||||
struct Test2 {
|
||||
parent: ^Test
|
||||
}
|
||||
|
||||
global func main(argc: i64, argv: i64) {
|
||||
name = "Oliver"
|
||||
|
||||
parent = new Test {
|
||||
name = &name
|
||||
global func main(args: []string) {
|
||||
i = 0
|
||||
printf("%d\n", args.count)
|
||||
while i < args.count {
|
||||
printf("%s\n", args[i])
|
||||
i = i + 1
|
||||
}
|
||||
|
||||
test = new Test2 {
|
||||
parent = &parent
|
||||
}
|
||||
|
||||
printf("%s\n", <string>(test.parent^.name^))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user