Big bug with scope() in nested { }

Mikola Lysenko mclysenk at mtu.edu
Sun Sep 24 06:39:42 PDT 2006


BCS wrote:
> This *is* a bug. Has it been reported yet?
> 
> <code>
> import std.stdio;
> 
> void main()
> {
> 	{
> 		scope(exit) writef("a\n");
> 	}
> 
> 	scope(exit) writef("b\n");
> }
> <code>
> 
> output:
> 
> a
> b
> b


Probably a new discovery.  This is related to the try-catch bug that has 
been around since DMD 0.150.  So far, no fix.  Here are the relevant posts:

http://lists.puremagic.com/pipermail/digitalmars-d-bugs/2006-May/000854.html
http://lists.puremagic.com/pipermail/digitalmars-d-bugs/2006-August/001911.html

Hopefully they will get fixed soon.



More information about the Digitalmars-d-bugs mailing list