Delegate is left with a destroyed stack object
Xiaoxi
xiaoxi at 163.com
Wed Oct 30 17:46:03 PDT 2013
On Wednesday, 30 October 2013 at 21:15:37 UTC, Ali Çehreli wrote:
> On 10/29/2013 10:55 AM, Ali Çehreli wrote:
>
> > Continuing the conversation from the following thread:
> >
> > http://forum.dlang.org/post/l4mi8l$1r1$1@digitalmars.com
>
> Kenji Hara added there:
>
> =====
> The combination of closure variables + scoped destruction should
> be rejected, but currently it isn't. It's a compiler bug.
>
> http://d.puremagic.com/issues/show_bug.cgi?id=11382
>
> Kenji Hara
> =====
>
> Ali
kenji is right. compilation error is the only safe approach, if
you do not wish scoped destruction, don’t request it in the first
place! dangerous operations like this should be explicit to avoid
surprises, not hidden in complicared implicit special cases.
More information about the Digitalmars-d
mailing list