repro:
exception MyException
let foo = () => {
@raises(MyException)
let bar = () => {
throw(MyException)
}
{"bar": bar}
}
it's trivial to see above that foo can never raise MyException. despite this, reanalyze exception analysis suggests that foo should be annotated:
{
"name": "Exception Analysis",
"kind": "warning",
"file": "Foo.res",
"range": [21,4,21,7],
"message": "foo might raise MyException (Foo.res:27:10) and is not annotated with @raises(MyException)",
"annotate": { "line": 21, "character": 0, "text": "@raises(MyException)\n", "action": "Add @raises annotation"}
}
this is incorrect and the annotation should not be suggested.