--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: JsDoWhileStatement.js --- # Input ```jsx function JsDoWhileStatement1() { do { break; } while (true); // afterBreak } function JsDoWhileStatement2() { do { continue; afterContinue(); } while (true); } ``` # Diagnostics ``` JsDoWhileStatement.js:4:14 lint/correctness/noUnreachable ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This code will never be reached ... 2 │ do { 3 │ break; > 4 │ } while (true); // afterBreak │ ^^^^ 5 │ } 6 │ i ... because this statement will break the flow of the code beforehand 1 │ function JsDoWhileStatement1() { 2 │ do { > 3 │ break; │ ^^^^^^ 4 │ } while (true); // afterBreak 5 │ } ``` ``` JsDoWhileStatement.js:10:9 lint/correctness/noUnreachable ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This code will never be reached ... 8 │ do { 9 │ continue; > 10 │ afterContinue(); │ ^^^^^^^^^^^^^^^^ 11 │ } while (true); 12 │ } i ... because this statement will continue the loop beforehand 7 │ function JsDoWhileStatement2() { 8 │ do { > 9 │ continue; │ ^^^^^^^^^ 10 │ afterContinue(); 11 │ } while (true); ```