digitalmars.D.bugs - [Issue 16201] New: When all paths inside a static if return/throw,
- via Digitalmars-d-bugs (34/34) Jun 24 2016 https://issues.dlang.org/show_bug.cgi?id=16201
https://issues.dlang.org/show_bug.cgi?id=16201 Issue ID: 16201 Summary: When all paths inside a static if return/throw, the portion after static if should be as if "else" were used Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: andrei erdani.com Consider: static if (condition) { ... code 1 ... return; } ... code 2 ... This should be treated by the compiler the same as: static if (condition) { ... code 1 ... return; } else { ... code 2 ... } Currently it gets quite annoying to have to nest multiple static ifs and elses. --
Jun 24 2016