How to annotate methods that always throw? #3602
Labels
duplicate
This is a duplicate of a linked issue
enhancement
This improves the quality of Phan's analysis of a codebase
In MediaWiki, all API modules use a method, dieWithError, which simply throws an exception.
AFAICS, phan cannot automatically determine that calling dieWithError will always throw, hence leading to false positives. See the bug report downstream for a couple of examples.
I wonder whether there could be an annotation to make phan infer that a method will always throw (maybe something along the line of @phan-assert, but unconditional).
The text was updated successfully, but these errors were encountered: