March 29, 2024 [Issue 24466] `scope(exit)` should not be allowed in the main scope of `noreturn` functions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24466 elpenguino+D@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |elpenguino+D@gmail.com --- Comment #1 from elpenguino+D@gmail.com --- I don't think it's accurate to do that for all noreturn scopes. Consider: ``` noreturn v(int a) { scope(exit) a++; { scope(exit) a++; } throw new Exception("Exception"); } ``` In this code, both scope guards should be executed. -- |
December 13 [Issue 24466] `scope(exit)` should not be allowed in the main scope of `noreturn` functions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24466 --- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20430 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- |
Copyright © 1999-2021 by the D Language Foundation