https://issues.dlang.org/show_bug.cgi?id=21538
Bolpat <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid, safe --- Comment #1 from Bolpat <[email protected]> --- DMD rejected the override from version 2.066 to 2.074.1; the regression affects DMD since 2.075.1. Just to prove that the cast and the actual delegate isn't the issue, the following compiles, too: auto dg = delegate() @system { int* p; int x; p = &x; }; // unsafe actions I i = new C; i.f(dg); // okay, unexpeced It works with function pointers, too: auto fp = () @system { int* p; int x; p = &x; }; i.g(fp); --
