www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 815] New: scope(exit) isn't executed when "continue" is used to continue a while-loop

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=815

           Summary: scope(exit) isn't executed when "continue" is used to
                    continue a while-loop
           Product: D
           Version: 1.00
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thomas-dloop kuehne.cn


# import std.stdio;
#
# void main(){
#    int i = 3;
#    while(i--){
#       scope(exit) writefln("scope(exit)");
#       writefln("i: %s", i);
#       if(i % 2) continue;
#    }
#
#    writefln("---");
#
#    i = 3;
#    while(i--){
#       scope(success) writefln("scope(success)");
#       writefln("i: %s", i);
#       if(i % 2) continue;
#    }
#
# }

output:
 i: 2
 scope(exit)
 i: 1
 i: 0
 scope(exit)
 ---
 i: 2
 scope(success)
 i: 1
 scope(success)
 i: 0
 scope(success)

expected output:
 i: 2
 scope(exit)
 i: 1
 scope(exit)
 i: 0
 scope(exit)
 ---
 i: 2
 scope(success)
 i: 1
 scope(success)
 i: 0
 scope(success)

--
Jan 07 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=815





------- Comment #1 from bugzilla digitalmars.com  2007-01-09 03:32 -------
Only exhibits error on dmd for Linux, not for Windows.


-- 
Jan 09 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=815





------- Comment #2 from larsivar igesund.net  2007-01-09 03:49 -------
Seems to fundamentally be the same issue as #621


-- 
Jan 09 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=815


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #3 from bugzilla digitalmars.com  2007-01-27 18:54 -------
Fixed DMD 1.001


-- 
Jan 27 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=815





------- Comment #4 from thomas-dloop kuehne.cn  2007-04-05 05:28 -------
Added to DStress as
http://dstress.kuehne.cn/run/s/scope_18_A.d
http://dstress.kuehne.cn/run/s/scope_18_B.d
http://dstress.kuehne.cn/run/s/scope_18_C.d

Seems to be fixed since DMD-1.001


-- 
Apr 05 2007