==== tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts (6 errors) ==== // All errors // naked break not allowed break; ~~~~~~ !!! A 'break' statement can only be used within an enclosing iteration or switch statement. // non-existent label ONE: while (true) break TWO; ~~~~~~~~~~ !!! A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: while (true){ var x = () => { break TWO; ~~~~~~~~~~ !!! Jump target cannot cross function boundary. } } THREE: while (true) { var fn = function () { break THREE; ~~~~~~~~~~~~ !!! Jump target cannot cross function boundary. } } // break forward while (true) { break FIVE; ~~~~~~~~~~~ !!! A 'break' statement can only jump to a label of an enclosing statement. FIVE: while (true) { } } // label on non-loop statement NINE: var y = 12; while (true) { break NINE; ~~~~~~~~~~~ !!! A 'break' statement can only jump to a label of an enclosing statement. }