[Issue 621] New: When inside a loop, if you call break inside a try block the finally block is never executed
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 30 12:16:36 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=621
Summary: When inside a loop, if you call break inside a try block
the finally block is never executed
Product: D
Version: 0.175
Platform: PC
OS/Version: Linux
Status: NEW
Severity: critical
Priority: P1
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: juanjo at comellas.com.ar
This bug happens only on Linux. I've verified that it works with DMD on
Windows. Here's a sample program that shows the bug:
import std.stdio;
int main(char[][] args)
{
while (true)
{
try
{
writefln("one");
break;
}
finally
{
// ERROR: This block is not executed
writefln("two");
}
}
writefln("three");
return 0;
}
--
More information about the Digitalmars-d-bugs
mailing list