Is it possible to have two or more outer function-scoped functions that have mutual call dependencies on each other?
I'm asking because
void main(string args[]) {
int x = 42;
void a() {
// do something with x
b();
}
void b() {
// do something with x
a();
}
}
errors in DMD as
/home/per/Work/justd/t_funs.d(5): Error: undefined identifier b
If not is this an unresolved issue or a feature?
you can declare the delegate
b
before a and then assignb
it'll require a refactor but not as bad as throwing it all in structs