seg-v in 4 lines (DMD 0.160 Linux/XP)
    BCS 
    BCS at pathlink.com
       
    Fri Jun 30 09:43:39 PDT 2006
    
    
  
Thomas Kuehne wrote:
> BCS schrieb am 2006-06-29:
 >
>>I think that the actions of the rest are not specified.
> 
> Replace scope with writefln("activate scope X"); and analyse again.
> 
<code>
import std.stdio;
void main()
{
goto skip;
scope(exit) head: writef("exit\n");
skip: writef("exiting\n");
}
</code>
scope.d(6): cannot goto forward into different try block level
Yet the latter test cases allow the skipping of scope statements using a 
switch. OTOH the scope statements do get executed as if they weren't 
skipped. Both of these actions are, as far as I can tell, undocumented. 
I don't know what should be the defined action but this just seems odd.
    
    
More information about the Digitalmars-d-bugs
mailing list