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/[email protected]
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.