mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
46 lines
813 B
Plaintext
46 lines
813 B
Plaintext
//// [tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts] ////
|
|
|
|
=== invalidForContinueStatements.ts ===
|
|
// All errors
|
|
|
|
// naked continue not allowed
|
|
continue;
|
|
|
|
// non-existent label
|
|
ONE:
|
|
for(;;) continue TWO;
|
|
|
|
// continue from inside function
|
|
TWO:
|
|
for(;;) {
|
|
var x = () => {
|
|
>x : Symbol(x, Decl(invalidForContinueStatements.ts, 12, 7))
|
|
|
|
continue TWO;
|
|
}
|
|
}
|
|
|
|
THREE:
|
|
for(;;) {
|
|
var fn = function () {
|
|
>fn : Symbol(fn, Decl(invalidForContinueStatements.ts, 19, 7))
|
|
|
|
continue THREE;
|
|
}
|
|
}
|
|
|
|
// continue forward
|
|
for(;;) {
|
|
continue FIVE;
|
|
FIVE:
|
|
for (; ;) { }
|
|
}
|
|
// label on non-loop statement
|
|
NINE:
|
|
var y = 12;
|
|
>y : Symbol(y, Decl(invalidForContinueStatements.ts, 32, 3))
|
|
|
|
for(;;) {
|
|
continue NINE;
|
|
}
|