--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: JsIfStatement.js --- # Input ```jsx function JsIfStatement1() { if (true) { return; } else { return; } afterIfElseReturn(); } ``` # Diagnostics ``` JsIfStatement.js:8:5 lint/correctness/noUnreachable ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This code will never be reached ... 6 │ } 7 │ > 8 │ afterIfElseReturn(); │ ^^^^^^^^^^^^^^^^^^^^ 9 │ } 10 │ i ... because either this statement ... 1 │ function JsIfStatement1() { 2 │ if (true) { > 3 │ return; │ ^^^^^^^ 4 │ } else { 5 │ return; i ... or this statement will return from the function beforehand 3 │ return; 4 │ } else { > 5 │ return; │ ^^^^^^^ 6 │ } 7 │ ```