Files
mgmt/lang/interpret_test/TestAstFunc1/recursive_class1.txtar
2023-06-01 16:56:44 -04:00

16 lines
332 B
Plaintext

-- main.mcl --
import "fmt"
$max = 3
include c1(0) # start at zero
class c1($count) {
if $count == $max {
test "done" {
stringptr => fmt.printf("count is %d", $count),
}
} else {
include c1($count + 1) # recursion not supported atm
}
}
-- OUTPUT --
# err: errSetScope: recursive reference while setting scope: not a dag