Accept only @throws and @doesNotThrow in reanalyze
Why
12.0.0-beta.14 deprecated @raises and @doesNotRaise in favour of @throws and @doesNotThrow (#7932). v13 drops the old spellings, the undeprecated @throw synonym, and the @doNotThrow/case variants, so one spelling remains for each annotation.
An old spelling is now an unknown attribute, so the code it annotated is reported like unannotated code. The compiler's own [@doesNotRaise] and [@@raises] annotations become [@doesNotThrow] and [@@throws].
modifiedReanalyze old annotation spellings
@raises(Not_found)let oldRaisesAnnotation = () => throw(Not_found)
reanalyze Exception Analysis
Before
After
no issue
ExnOldSpellings.res:5:5-23oldRaisesAnnotation might throw Not_found (ExnOldSpellings.res:5:32) and is not annotated with @throws(Not_found)
Review
- Why no dedicated warning for an old spelling? The missing-annotation report already names the
@throws(...)to write, and recognizing the old names only to reject them would keep them in the analysis.