Array type works with args

This commit is contained in:
nub31
2025-05-22 19:31:11 +02:00
parent ba51daa3c0
commit f6d7cdbf58
9 changed files with 250 additions and 105 deletions

View File

@@ -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^))
}
}