Added unreachable macro to alleged unreachable code rather than using hidden default value#169
Conversation
… hidden default value
No need to worry, it's impossible to fall in that case... as long as Lines 475 to 487 in e75a55f It could be interesting to add a comment on that method to say it should never return |
IMO this is good, it's usually better to fail early and detect these kind of bugs instead of failing silently and causing problems in other areas that are hard to track back. |
I agree, still it's something to note about this innocent-looking two-line PR ;) |
Should I add that as part of this PR? |
Yes please! |
Idk if the way I did it works, but it was the best I could think of |
|
@Sheepyhead Please run |
Head branch was pushed to by a user without write access
… hidden default value (#169) * Added unreachable macro to alleged unreachable code rather than using hidden default value * Added comment warning * Fixed formatting Co-authored-by: Troels Peter Jessen <[email protected]>
Objective
Fixes #168
Context
This doesn't seem to panic any tests, but this still confers a risk to users that this code has actually been reached by some edge cases, where it would simply fail silently before.
Feedback wanted