← Back to index
|
Original Bugzilla link
Bug 815 – scope(exit) isn't executed when "continue" is used to continue a while-loop
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-01-07T18:05:00Z
Last change time
2014-02-15T13:13:14Z
Keywords
wrong-code
Assigned to
bugzilla
Creator
thomas-dloop
Comments
Comment #0
by thomas-dloop — 2007-01-07T18:05:27Z
# 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)
Comment #1
by bugzilla — 2007-01-09T03:32:05Z
Only exhibits error on dmd for Linux, not for Windows.
Comment #2
by larsivar — 2007-01-09T03:49:08Z
Seems to fundamentally be the same issue as #621
Comment #3
by bugzilla — 2007-01-27T18:54:38Z
Fixed DMD 1.001
Comment #4
by thomas-dloop — 2007-04-05T05:28:01Z
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