Lower final switch default error to object.d template#7303
Lower final switch default error to object.d template#7303dlang-bot merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @somzzz! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
32bad72 to
fb5b149
Compare
| RTLSYM_SWITCH_DSTRING, | ||
| RTLSYM_SWITCH_STRING, // unused | ||
| RTLSYM_SWITCH_USTRING, // unused | ||
| RTLSYM_SWITCH_DSTRING, // unused |
There was a problem hiding this comment.
https://issues.dlang.org/show_bug.cgi?id=9395 would be very useful here ;-)
src/ddmd/s2ir.d
Outdated
There was a problem hiding this comment.
It's a good style to provide an informative error message or do sth. like
assert(s.exp !is null, "SwitchErrorStatement needs to have a valid Expression.") and skip the if entirely.
There was a problem hiding this comment.
It's a good style to provide an informative error message or do sth. like...
@WalterBright disagrees: #7079 (comment)
Some people like assert messages, I don't. They bloat up the compiler. Leaving the message as a comment in the source code is plenty good enough.
I really don't mind either way, just an FYI.
b07c426 to
a1dad09
Compare
a1dad09 to
2e4c072
Compare
Druntime changes: dlang/druntime#1971
I still had to use
SwitchErrorStatementbecause of the checks and actions the compiler performs forErrorStatemenetsvs regularStatements.