💅 correctness/noUnreachable
incorrect for try/catch/finally
when there is a jump before the finally
block
#4946
Labels
A-Linter
Area: linter
L-JavaScript
Language: JavaScript and super languages
S-Bug-confirmed
Status: report has been confirmed as a valid bug
Environment information
Rule name
noUnreachable
Playground link
https://biomejs.dev/playground/?code=ZgB1AG4AYwB0AGkAbwBuACAAZgAoACkAIAB7AAoACQB3AGgAaQBsAGUAIAAoAHQAcgB1AGUAKQAgAHsACgAJAAkAdAByAHkAIAB7AAoACQAJAAkAYgByAGUAYQBrADsACgAJAAkAfQAgAGYAaQBuAGEAbABsAHkAIAB7AAoACQAJAAkAYwBvAG4AcwBvAGwAZQAuAGwAbwBnACgAIgByAGUAYQBjAGgAYQBiAGwAZQAiACkAOwAKAAkACQB9AAoACQAJAGMAbwBuAHMAbwBsAGUALgBsAG8AZwAoACIAdQBuAHIAZQBhAGMAaABhAGIAbABlACIAKQA7AAoACQB9AAoAfQA%3D
Expected result
In the below snippet, both log statements are marked as unreachable, but only the second is. It looks like the control flow analysis is not taking into account that the
finally
block is resolved before any jumps from thetry
block?Code of Conduct
The text was updated successfully, but these errors were encountered: