D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14437 - Double scope(failure) ignored
Summary: Double scope(failure) ignored
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 minor
Assignee: No Owner
URL:
Keywords: EH, wrong-code
Depends on:
Blocks:
 
Reported: 2015-04-10 15:43 UTC by David Eckardt
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Eckardt 2015-04-10 15:43:22 UTC
import std.c.stdio;

void main() {
    scope (failure){scope (failure) puts("1");}
    scope (failure) scope (failure) puts("2");
    scope (exit)    scope (failure) puts("3");
    throw new Exception("abc");
}

***

prints "2" although it shouldn't. It does not print "1" or "3".
Comment 1 basile-z 2017-03-08 07:57:36 UTC
The code that should reproduce the bug is now invalid and doesn't compile