Closed ZeeD closed 1 year ago
oh, and it seems that adding a spurious return
after the throw
makes bslint
happy - it seems that the tool just ignore the throw
flow
Closing as this is already being tracked by #71 . But yes, this is definitely something we need to fix at some point. I'd be happy to help you set up the bslint project to fix the bug if you're interested (I'm swamped with other work so this is a bit lower of a priority).
(oh, sorry for the duplicate, I searched with the error code and totally missed the other issue with the same error message)
(oh, sorry for the duplicate, I searched with the error code and totally missed the other issue with the same error message)
No worries!
minimal test:
running
bslint
on this snippet will return the error messageerror BSLINT2004: Not all code paths return a value
, but IMHO this is a false result, as all branches here return (or, in this case throw) some value.For instance I have the same error even on little variations, like
but not on a (conceptually equals) variant, like