TypeScript/tests/baselines/reference/invalidForContinueStatements.errors.txt
2014-07-23 12:07:46 -07:00

40 lines
No EOL
833 B
Text

==== tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts (1 errors) ====
// All errors
// naked continue not allowed
continue;
~~~~~~~~
!!! A 'continue' statement can only be used within an enclosing iteration statement.
// non-existent label
ONE:
for(;;) continue TWO;
// continue from inside function
TWO:
for(;;) {
var x = () => {
continue TWO;
}
}
THREE:
for(;;) {
var fn = function () {
continue THREE;
}
}
// continue forward
for(;;) {
continue FIVE;
FIVE:
for (; ;) { }
}
// label on non-loop statement
NINE:
var y = 12;
for(;;) {
continue NINE;
}