no-return analysis now no longer confuses void branches for true
no-returns.
Details
No-return analysis now dives into the trees of if/try/block/case
statements in order to determine if they are in fact no-return
scenarios. This is only done for the statement variety.
The updated analysis besides being more correct, in that it avoids false
positive no-return identification, it still allows for a number of false
negatives. Chiefly that unstructured exits ( return/break/raise ) are
only considered in the trailing position of statement lists and not part
way through. This is considered acceptable as there is an overall
improvement in accuracy and it should cover most code.
This includes a fix for an NPE crash in discard-or-use error reporting.
Summary
no-return analysis now no longer confuses
void
branches for true no-returns.Details
No-return analysis now dives into the trees of
if/try/block/case
statements in order to determine if they are in fact no-return scenarios. This is only done for the statement variety.The updated analysis besides being more correct, in that it avoids false positive no-return identification, it still allows for a number of false negatives. Chiefly that unstructured exits (
return/break/raise
) are only considered in the trailing position of statement lists and not part way through. This is considered acceptable as there is an overall improvement in accuracy and it should cover most code.This includes a fix for an NPE crash in discard-or-use error reporting.