Open
Description
Summary
Introduce a warning for dead exception handlers
Description
In the following code snippet, no exceptions can be raised and therefore, the exception handler is dead code which can be removed. Similar to other cases of dead code, this should have a warning:
proc f() {.raises: [].} = discard
try:
f()
except CatchableError: # No exceptions can result from `f`
discard
Alternatives
No response
Examples
No response
Backwards Compatibility
No response
Links
No response