For the following code I get the bellow error. I'm wondering if I should be reporting a bug, or if creating default delegates is correctly prevented?
.\defltdg.d(10): Error: delegate defltdg.__dgliteral3 is a nested function and
cannot be accessed from main
import std.stdio;
void main() {
take(() {writeln("Hello world");});
take(() {});
take();
}
void take(void delegate() dg = () {}) {
dg();
}
