[Issue 17449] [DIP1000] crash due to covariant conversion of scope delegate to delegate
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jun 5 23:16:32 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17449
--- Comment #1 from Rainer Schuetze <r.sagitario at gmx.de> ---
Reduced test:
void main()
{
void delegate() dg;
void savedg(void delegate() h) { dg = h; }
void foo(int x) { savedg({ assert(x == 42); }); }
foo(42);
dg();
}
Assertion failure with -dip1000, fine without.
It is also ok if dg is made global, so maybe escape analysis fails for local
functions only.
--
More information about the Digitalmars-d-bugs
mailing list