diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3c994fc3fe4..25c537f169a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5276,9 +5276,6 @@ module ts { } } } - else { - error(node, Diagnostics.return_statement_has_no_containing_function); - } } } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 7d34f8987c4..47df80893ff 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -394,13 +394,17 @@ module ts { var lookAheadMode = LookAheadMode.NotLookingAhead; var inAmbientContext = false; + var inModuleBody = false; var inFunctionBody = false; var inSwitchStatement = ControlBlockContext.NotNested; var inIterationStatement = ControlBlockContext.NotNested; var labelledStatementInfo = (() => { + // TODO(jfreeman): Implement a data structure for tracking labels var functionBoundarySentinel = {}; var labelledStatementStack: LabelledStatement[]; + + // TODO(jfreeman): Fill in these stubs return { getLength: (): number => 0, enqueueFunctionBoundary: () => { }, @@ -2072,12 +2076,56 @@ module ts { function parseBreakOrContinueStatement(kind: SyntaxKind): BreakOrContinueStatement { var node = createNode(kind); + var errorCountBeforeStatement = file.syntacticErrors.length; + var keywordStart = scanner.getTokenPos(); + var keywordLength = scanner.getTextPos() - keywordStart; parseExpected(kind === SyntaxKind.BreakStatement ? SyntaxKind.BreakKeyword : SyntaxKind.ContinueKeyword); if (!isSemicolon()) node.label = parseIdentifier(); parseSemicolon(); + + // In an ambient context, we will already give an error for having a statement. + if (!inAmbientContext && errorCountBeforeStatement === file.syntacticErrors.length) { + if (!node.label) { + checkAnonymousBreakOrContinueStatement(kind, keywordStart, keywordLength); + } + } return finishNode(node); } + function checkAnonymousBreakOrContinueStatement(kind: SyntaxKind, errorStart: number, errorLength: number): void { + if (kind === SyntaxKind.BreakStatement) { + if (inIterationStatement === ControlBlockContext.Nested + || inSwitchStatement === ControlBlockContext.Nested) { + return; + } + else if (inIterationStatement === ControlBlockContext.NotNested + && inSwitchStatement === ControlBlockContext.NotNested) { + grammarErrorAtPos(errorStart, errorLength, + Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement); + return; + } + // Fall through + } + else if (kind === SyntaxKind.ContinueStatement) { + if (inIterationStatement === ControlBlockContext.Nested) { + return; + } + else if (inIterationStatement === ControlBlockContext.NotNested) { + grammarErrorAtPos(errorStart, errorLength, + Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement); + return; + } + // Fall through + } + else { + Debug.fail("checkAnonymousBreakOrContinueStatement"); + } + + Debug.assert(inIterationStatement === ControlBlockContext.CrossingFunctionBoundary + || inSwitchStatement === ControlBlockContext.CrossingFunctionBoundary); + grammarErrorAtPos(errorStart, errorLength, Diagnostics.Jump_target_cannot_cross_function_boundary); + } + function parseReturnStatement(): ReturnStatement { var node = createNode(SyntaxKind.ReturnStatement); var errorCountBeforeReturnStatement = file.syntacticErrors.length; @@ -2088,7 +2136,7 @@ module ts { if (!isSemicolon()) node.expression = parseExpression(); parseSemicolon(); - if (!inFunctionBody && errorCountBeforeReturnStatement === file.syntacticErrors.length) { + if (!inFunctionBody && !inModuleBody && errorCountBeforeReturnStatement === file.syntacticErrors.length) { grammarErrorAtPos(returnTokenStart, returnTokenLength, Diagnostics.A_return_statement_can_only_be_used_within_a_function_body); } return finishNode(node); @@ -2827,7 +2875,11 @@ module ts { function parseModuleBody(): Block { var node = createNode(SyntaxKind.ModuleBlock); if (parseExpected(SyntaxKind.OpenBraceToken)) { + var saveInModuleBody = inModuleBody; + inModuleBody = true; node.statements = parseList(ParsingContext.ModuleElements, parseModuleElement); + inModuleBody = saveInModuleBody; + parseExpected(SyntaxKind.CloseBraceToken); } else { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 8aeea1ad235..6173750759f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -407,12 +407,10 @@ module ts { } export interface DoStatement extends IterationStatement { - statement: Statement; expression: Expression; } export interface WhileStatement extends IterationStatement { - statement: Statement; expression: Expression; } @@ -421,14 +419,12 @@ module ts { initializer?: Expression; condition?: Expression; iterator?: Expression; - statement: Statement; } export interface ForInStatement extends IterationStatement { declaration?: VariableDeclaration; variable?: Expression; expression: Expression; - statement: Statement; } export interface BreakOrContinueStatement extends Statement { diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt new file mode 100644 index 00000000000..fb72cb2337f --- /dev/null +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt @@ -0,0 +1,4 @@ +==== tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts (1 errors) ==== + break; + ~~~~~ +!!! A 'break' statement can only be used within an enclosing iteration or switch statement. \ No newline at end of file diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.js b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.js deleted file mode 100644 index 21ca5d4cce4..00000000000 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [breakNotInIterationOrSwitchStatement1.ts] -break; - -//// [breakNotInIterationOrSwitchStatement1.js] -break; diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt new file mode 100644 index 00000000000..3a04554decf --- /dev/null +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt @@ -0,0 +1,8 @@ +==== tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts (1 errors) ==== + while (true) { + function f() { + break; + ~~~~~ +!!! Jump target cannot cross function boundary. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.js b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.js deleted file mode 100644 index 531e5b5e5b6..00000000000 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [breakNotInIterationOrSwitchStatement2.ts] -while (true) { - function f() { - break; - } -} - -//// [breakNotInIterationOrSwitchStatement2.js] -while (true) { - function f() { - break; - } -} diff --git a/tests/baselines/reference/continueNotInIterationStatement1.errors.txt b/tests/baselines/reference/continueNotInIterationStatement1.errors.txt new file mode 100644 index 00000000000..6875d311520 --- /dev/null +++ b/tests/baselines/reference/continueNotInIterationStatement1.errors.txt @@ -0,0 +1,4 @@ +==== tests/cases/compiler/continueNotInIterationStatement1.ts (1 errors) ==== + continue; + ~~~~~~~~ +!!! A 'continue' statement can only be used within an enclosing iteration statement. \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement1.js b/tests/baselines/reference/continueNotInIterationStatement1.js deleted file mode 100644 index b6fd1786cdf..00000000000 --- a/tests/baselines/reference/continueNotInIterationStatement1.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [continueNotInIterationStatement1.ts] -continue; - -//// [continueNotInIterationStatement1.js] -continue; diff --git a/tests/baselines/reference/continueNotInIterationStatement2.errors.txt b/tests/baselines/reference/continueNotInIterationStatement2.errors.txt new file mode 100644 index 00000000000..945f8e7eede --- /dev/null +++ b/tests/baselines/reference/continueNotInIterationStatement2.errors.txt @@ -0,0 +1,8 @@ +==== tests/cases/compiler/continueNotInIterationStatement2.ts (1 errors) ==== + while (true) { + function f() { + continue; + ~~~~~~~~ +!!! Jump target cannot cross function boundary. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement2.js b/tests/baselines/reference/continueNotInIterationStatement2.js deleted file mode 100644 index 047c3b49f06..00000000000 --- a/tests/baselines/reference/continueNotInIterationStatement2.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [continueNotInIterationStatement2.ts] -while (true) { - function f() { - continue; - } -} - -//// [continueNotInIterationStatement2.js] -while (true) { - function f() { - continue; - } -} diff --git a/tests/baselines/reference/continueNotInIterationStatement3.errors.txt b/tests/baselines/reference/continueNotInIterationStatement3.errors.txt new file mode 100644 index 00000000000..56aef1000f7 --- /dev/null +++ b/tests/baselines/reference/continueNotInIterationStatement3.errors.txt @@ -0,0 +1,7 @@ +==== tests/cases/compiler/continueNotInIterationStatement3.ts (1 errors) ==== + switch (0) { + default: + continue; + ~~~~~~~~ +!!! A 'continue' statement can only be used within an enclosing iteration statement. + } \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement3.js b/tests/baselines/reference/continueNotInIterationStatement3.js deleted file mode 100644 index 11018019871..00000000000 --- a/tests/baselines/reference/continueNotInIterationStatement3.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [continueNotInIterationStatement3.ts] -switch (0) { - default: - continue; -} - -//// [continueNotInIterationStatement3.js] -switch (0) { - default: - continue; -} diff --git a/tests/baselines/reference/interfaceExtendingClass2.errors.txt b/tests/baselines/reference/interfaceExtendingClass2.errors.txt index bfff1be2b3c..d3de7666ea4 100644 --- a/tests/baselines/reference/interfaceExtendingClass2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClass2.errors.txt @@ -19,8 +19,8 @@ return 1; ~~~~~~ !!! Property or signature expected. - ~~~~~~~~~ -!!! 'return' statement has no containing function. + ~~~~~~ +!!! A 'return' statement can only be used within a function body. }; ~ !!! Declaration or statement expected. diff --git a/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt new file mode 100644 index 00000000000..91852a9e77e --- /dev/null +++ b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt @@ -0,0 +1,41 @@ +==== tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts (1 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: + do break TWO; while (true) + + // break from inside function + TWO: + do { + var x = () => { + break TWO; + } + }while (true) + + THREE: + do { + var fn = function () { + break THREE; + } + }while (true) + + // break forward + do { + break FIVE; + FIVE: + do { } while (true) + }while (true) + + // label on non-loop statement + NINE: + var y = 12; + + do { + break NINE; + }while (true) \ No newline at end of file diff --git a/tests/baselines/reference/invalidDoWhileBreakStatements.js b/tests/baselines/reference/invalidDoWhileBreakStatements.js deleted file mode 100644 index 4eab7f5098c..00000000000 --- a/tests/baselines/reference/invalidDoWhileBreakStatements.js +++ /dev/null @@ -1,64 +0,0 @@ -//// [invalidDoWhileBreakStatements.ts] -// All errors - -// naked break not allowed -break; - -// non-existent label -ONE: -do break TWO; while (true) - -// break from inside function -TWO: -do { - var x = () => { - break TWO; - } -}while (true) - -THREE: -do { - var fn = function () { - break THREE; - } -}while (true) - -// break forward -do { - break FIVE; - FIVE: - do { } while (true) -}while (true) - -// label on non-loop statement -NINE: -var y = 12; - -do { - break NINE; -}while (true) - -//// [invalidDoWhileBreakStatements.js] -break; -ONE: do - break TWO; -while (true); -TWO: do { - var x = function () { - break TWO; - }; -} while (true); -THREE: do { - var fn = function () { - break THREE; - }; -} while (true); -do { - break FIVE; - FIVE: do { - } while (true); -} while (true); -NINE: var y = 12; -do { - break NINE; -} while (true); diff --git a/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt new file mode 100644 index 00000000000..798afdc3b75 --- /dev/null +++ b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt @@ -0,0 +1,41 @@ +==== tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.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: + do continue TWO; while (true) + + // continue from inside function + TWO: + do { + var x = () => { + continue TWO; + } + }while (true) + + THREE: + do { + var fn = function () { + continue THREE; + } + }while (true) + + // continue forward + do { + continue FIVE; + FIVE: + do { } while (true) + }while (true) + + // label on non-loop statement + NINE: + var y = 12; + + do { + continue NINE; + }while (true) \ No newline at end of file diff --git a/tests/baselines/reference/invalidDoWhileContinueStatements.js b/tests/baselines/reference/invalidDoWhileContinueStatements.js deleted file mode 100644 index ebb76c707ad..00000000000 --- a/tests/baselines/reference/invalidDoWhileContinueStatements.js +++ /dev/null @@ -1,64 +0,0 @@ -//// [invalidDoWhileContinueStatements.ts] -// All errors - -// naked continue not allowed -continue; - -// non-existent label -ONE: -do continue TWO; while (true) - -// continue from inside function -TWO: -do { - var x = () => { - continue TWO; - } -}while (true) - -THREE: -do { - var fn = function () { - continue THREE; - } -}while (true) - -// continue forward -do { - continue FIVE; - FIVE: - do { } while (true) -}while (true) - -// label on non-loop statement -NINE: -var y = 12; - -do { - continue NINE; -}while (true) - -//// [invalidDoWhileContinueStatements.js] -continue; -ONE: do - continue TWO; -while (true); -TWO: do { - var x = function () { - continue TWO; - }; -} while (true); -THREE: do { - var fn = function () { - continue THREE; - }; -} while (true); -do { - continue FIVE; - FIVE: do { - } while (true); -} while (true); -NINE: var y = 12; -do { - continue NINE; -} while (true); diff --git a/tests/baselines/reference/invalidForBreakStatements.errors.txt b/tests/baselines/reference/invalidForBreakStatements.errors.txt new file mode 100644 index 00000000000..0edc26132cb --- /dev/null +++ b/tests/baselines/reference/invalidForBreakStatements.errors.txt @@ -0,0 +1,40 @@ +==== tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts (1 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: + for(;;) break TWO; + + // break from inside function + TWO: + for(;;) { + var x = () => { + break TWO; + } + } + + THREE: + for(;;) { + var fn = function () { + break THREE; + } + } + + // break forward + for(;;) { + break FIVE; + FIVE: + for (; ;) { } + } + // label on non-loop statement + NINE: + var y = 12; + + for(;;) { + break NINE; + } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForBreakStatements.js b/tests/baselines/reference/invalidForBreakStatements.js deleted file mode 100644 index 42a05d9d451..00000000000 --- a/tests/baselines/reference/invalidForBreakStatements.js +++ /dev/null @@ -1,62 +0,0 @@ -//// [invalidForBreakStatements.ts] -// All errors - -// naked break not allowed -break; - -// non-existent label -ONE: -for(;;) break TWO; - -// break from inside function -TWO: -for(;;) { - var x = () => { - break TWO; - } -} - -THREE: -for(;;) { - var fn = function () { - break THREE; - } -} - -// break forward -for(;;) { - break FIVE; - FIVE: - for (; ;) { } -} -// label on non-loop statement -NINE: -var y = 12; - -for(;;) { - break NINE; -} - -//// [invalidForBreakStatements.js] -break; -ONE: for (;;) - break TWO; -TWO: for (;;) { - var x = function () { - break TWO; - }; -} -THREE: for (;;) { - var fn = function () { - break THREE; - }; -} -for (;;) { - break FIVE; - FIVE: for (;;) { - } -} -NINE: var y = 12; -for (;;) { - break NINE; -} diff --git a/tests/baselines/reference/invalidForContinueStatements.errors.txt b/tests/baselines/reference/invalidForContinueStatements.errors.txt new file mode 100644 index 00000000000..e5bf379e931 --- /dev/null +++ b/tests/baselines/reference/invalidForContinueStatements.errors.txt @@ -0,0 +1,40 @@ +==== 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; + } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForContinueStatements.js b/tests/baselines/reference/invalidForContinueStatements.js deleted file mode 100644 index 1204fe981c7..00000000000 --- a/tests/baselines/reference/invalidForContinueStatements.js +++ /dev/null @@ -1,62 +0,0 @@ -//// [invalidForContinueStatements.ts] -// All errors - -// naked continue not allowed -continue; - -// 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; -} - -//// [invalidForContinueStatements.js] -continue; -ONE: for (;;) - continue TWO; -TWO: for (;;) { - var x = function () { - continue TWO; - }; -} -THREE: for (;;) { - var fn = function () { - continue THREE; - }; -} -for (;;) { - continue FIVE; - FIVE: for (;;) { - } -} -NINE: var y = 12; -for (;;) { - continue NINE; -} diff --git a/tests/baselines/reference/invalidForInBreakStatements.errors.txt b/tests/baselines/reference/invalidForInBreakStatements.errors.txt new file mode 100644 index 00000000000..a9b3034bccc --- /dev/null +++ b/tests/baselines/reference/invalidForInBreakStatements.errors.txt @@ -0,0 +1,41 @@ +==== tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts (1 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: + for (var x in {}) break TWO; + + // break from inside function + TWO: + for (var x in {}) { + var fn = () => { + break TWO; + } + } + + THREE: + for (var x in {}) { + var fn = function () { + break THREE; + } + } + + // break forward + for (var x in {}) { + break FIVE; + FIVE: + for (var x in {}) { } + } + + // label on non-loop statement + NINE: + var y = 12; + + for (var x in {}) { + break NINE; + } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForInBreakStatements.js b/tests/baselines/reference/invalidForInBreakStatements.js deleted file mode 100644 index b9f4c0dcb97..00000000000 --- a/tests/baselines/reference/invalidForInBreakStatements.js +++ /dev/null @@ -1,63 +0,0 @@ -//// [invalidForInBreakStatements.ts] -// All errors - -// naked break not allowed -break; - -// non-existent label -ONE: -for (var x in {}) break TWO; - -// break from inside function -TWO: -for (var x in {}) { - var fn = () => { - break TWO; - } -} - -THREE: -for (var x in {}) { - var fn = function () { - break THREE; - } -} - -// break forward -for (var x in {}) { - break FIVE; - FIVE: - for (var x in {}) { } -} - -// label on non-loop statement -NINE: -var y = 12; - -for (var x in {}) { - break NINE; -} - -//// [invalidForInBreakStatements.js] -break; -ONE: for (var x in {}) - break TWO; -TWO: for (var x in {}) { - var fn = function () { - break TWO; - }; -} -THREE: for (var x in {}) { - var fn = function () { - break THREE; - }; -} -for (var x in {}) { - break FIVE; - FIVE: for (var x in {}) { - } -} -NINE: var y = 12; -for (var x in {}) { - break NINE; -} diff --git a/tests/baselines/reference/invalidForInContinueStatements.errors.txt b/tests/baselines/reference/invalidForInContinueStatements.errors.txt new file mode 100644 index 00000000000..690b40acdd9 --- /dev/null +++ b/tests/baselines/reference/invalidForInContinueStatements.errors.txt @@ -0,0 +1,41 @@ +==== tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.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 (var x in {}) continue TWO; + + // continue from inside function + TWO: + for (var x in {}) { + var fn = () => { + continue TWO; + } + } + + THREE: + for (var x in {}) { + var fn = function () { + continue THREE; + } + } + + // continue forward + for (var x in {}) { + continue FIVE; + FIVE: + for (var x in {}) { } + } + + // label on non-loop statement + NINE: + var y = 12; + + for (var x in {}) { + continue NINE; + } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForInContinueStatements.js b/tests/baselines/reference/invalidForInContinueStatements.js deleted file mode 100644 index 8884f35034a..00000000000 --- a/tests/baselines/reference/invalidForInContinueStatements.js +++ /dev/null @@ -1,63 +0,0 @@ -//// [invalidForInContinueStatements.ts] -// All errors - -// naked continue not allowed -continue; - -// non-existent label -ONE: -for (var x in {}) continue TWO; - -// continue from inside function -TWO: -for (var x in {}) { - var fn = () => { - continue TWO; - } -} - -THREE: -for (var x in {}) { - var fn = function () { - continue THREE; - } -} - -// continue forward -for (var x in {}) { - continue FIVE; - FIVE: - for (var x in {}) { } -} - -// label on non-loop statement -NINE: -var y = 12; - -for (var x in {}) { - continue NINE; -} - -//// [invalidForInContinueStatements.js] -continue; -ONE: for (var x in {}) - continue TWO; -TWO: for (var x in {}) { - var fn = function () { - continue TWO; - }; -} -THREE: for (var x in {}) { - var fn = function () { - continue THREE; - }; -} -for (var x in {}) { - continue FIVE; - FIVE: for (var x in {}) { - } -} -NINE: var y = 12; -for (var x in {}) { - continue NINE; -} diff --git a/tests/baselines/reference/invalidSwitchContinueStatement.errors.txt b/tests/baselines/reference/invalidSwitchContinueStatement.errors.txt new file mode 100644 index 00000000000..c6ac769f7ac --- /dev/null +++ b/tests/baselines/reference/invalidSwitchContinueStatement.errors.txt @@ -0,0 +1,10 @@ +==== tests/cases/conformance/statements/continueStatements/invalidSwitchContinueStatement.ts (1 errors) ==== + // continue is not allowed in a switch statement + + switch (12) { + case 5: + continue; + ~~~~~~~~ +!!! A 'continue' statement can only be used within an enclosing iteration statement. + } + \ No newline at end of file diff --git a/tests/baselines/reference/invalidSwitchContinueStatement.js b/tests/baselines/reference/invalidSwitchContinueStatement.js deleted file mode 100644 index da3a5075e0e..00000000000 --- a/tests/baselines/reference/invalidSwitchContinueStatement.js +++ /dev/null @@ -1,14 +0,0 @@ -//// [invalidSwitchContinueStatement.ts] -// continue is not allowed in a switch statement - -switch (12) { - case 5: - continue; -} - - -//// [invalidSwitchContinueStatement.js] -switch (12) { - case 5: - continue; -} diff --git a/tests/baselines/reference/invalidWhileBreakStatements.errors.txt b/tests/baselines/reference/invalidWhileBreakStatements.errors.txt new file mode 100644 index 00000000000..4ad5b0cfff9 --- /dev/null +++ b/tests/baselines/reference/invalidWhileBreakStatements.errors.txt @@ -0,0 +1,41 @@ +==== tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts (1 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; + + // break from inside function + TWO: + while (true){ + var x = () => { + break TWO; + } + } + + THREE: + while (true) { + var fn = function () { + break THREE; + } + } + + // break forward + while (true) { + break FIVE; + FIVE: + while (true) { } + } + + // label on non-loop statement + NINE: + var y = 12; + + while (true) { + break NINE; + } \ No newline at end of file diff --git a/tests/baselines/reference/invalidWhileBreakStatements.js b/tests/baselines/reference/invalidWhileBreakStatements.js deleted file mode 100644 index 9206a28d09d..00000000000 --- a/tests/baselines/reference/invalidWhileBreakStatements.js +++ /dev/null @@ -1,63 +0,0 @@ -//// [invalidWhileBreakStatements.ts] -// All errors - -// naked break not allowed -break; - -// non-existent label -ONE: -while (true) break TWO; - -// break from inside function -TWO: -while (true){ - var x = () => { - break TWO; - } -} - -THREE: -while (true) { - var fn = function () { - break THREE; - } -} - -// break forward -while (true) { - break FIVE; - FIVE: - while (true) { } -} - -// label on non-loop statement -NINE: -var y = 12; - -while (true) { - break NINE; -} - -//// [invalidWhileBreakStatements.js] -break; -ONE: while (true) - break TWO; -TWO: while (true) { - var x = function () { - break TWO; - }; -} -THREE: while (true) { - var fn = function () { - break THREE; - }; -} -while (true) { - break FIVE; - FIVE: while (true) { - } -} -NINE: var y = 12; -while (true) { - break NINE; -} diff --git a/tests/baselines/reference/invalidWhileContinueStatements.errors.txt b/tests/baselines/reference/invalidWhileContinueStatements.errors.txt new file mode 100644 index 00000000000..5dbc8fdaafa --- /dev/null +++ b/tests/baselines/reference/invalidWhileContinueStatements.errors.txt @@ -0,0 +1,41 @@ +==== tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.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: + while (true) continue TWO; + + // continue from inside function + TWO: + while (true){ + var x = () => { + continue TWO; + } + } + + THREE: + while (true) { + var fn = function () { + continue THREE; + } + } + + // continue forward + while (true) { + continue FIVE; + FIVE: + while (true) { } + } + + // label on non-loop statement + NINE: + var y = 12; + + while (true) { + continue NINE; + } \ No newline at end of file diff --git a/tests/baselines/reference/invalidWhileContinueStatements.js b/tests/baselines/reference/invalidWhileContinueStatements.js deleted file mode 100644 index afd5799a7cf..00000000000 --- a/tests/baselines/reference/invalidWhileContinueStatements.js +++ /dev/null @@ -1,63 +0,0 @@ -//// [invalidWhileContinueStatements.ts] -// All errors - -// naked continue not allowed -continue; - -// non-existent label -ONE: -while (true) continue TWO; - -// continue from inside function -TWO: -while (true){ - var x = () => { - continue TWO; - } -} - -THREE: -while (true) { - var fn = function () { - continue THREE; - } -} - -// continue forward -while (true) { - continue FIVE; - FIVE: - while (true) { } -} - -// label on non-loop statement -NINE: -var y = 12; - -while (true) { - continue NINE; -} - -//// [invalidWhileContinueStatements.js] -continue; -ONE: while (true) - continue TWO; -TWO: while (true) { - var x = function () { - continue TWO; - }; -} -THREE: while (true) { - var fn = function () { - continue THREE; - }; -} -while (true) { - continue FIVE; - FIVE: while (true) { - } -} -NINE: var y = 12; -while (true) { - continue NINE; -} diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt index 2dcdf22960d..42336209049 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt @@ -2,7 +2,7 @@ var f: (x: 'hi') => number = ('hi') => { return 1; }; ~~ !!! ';' expected. + ~~~~~~ +!!! A 'return' statement can only be used within a function body. ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. - ~~~~~~~~~ -!!! 'return' statement has no containing function. \ No newline at end of file +!!! Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file diff --git a/tests/baselines/reference/parserErrorRecovery_ModuleElement1.errors.txt b/tests/baselines/reference/parserErrorRecovery_ModuleElement1.errors.txt index 56292f2a369..1a8a96d2dda 100644 --- a/tests/baselines/reference/parserErrorRecovery_ModuleElement1.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_ModuleElement1.errors.txt @@ -1,13 +1,13 @@ ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ModuleElements/parserErrorRecovery_ModuleElement1.ts (4 errors) ==== return foo; - ~~~~~~~~~~~ -!!! 'return' statement has no containing function. + ~~~~~~ +!!! A 'return' statement can only be used within a function body. } ~ !!! Declaration or statement expected. return bar; - ~~~~~~~~~~~ -!!! 'return' statement has no containing function. + ~~~~~~ +!!! A 'return' statement can only be used within a function body. } ~ !!! Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserErrorRecovery_VariableList1.errors.txt b/tests/baselines/reference/parserErrorRecovery_VariableList1.errors.txt index 5804357b5a4..2c27e1cebf3 100644 --- a/tests/baselines/reference/parserErrorRecovery_VariableList1.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_VariableList1.errors.txt @@ -1,5 +1,7 @@ -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/VariableLists/parserErrorRecovery_VariableList1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/VariableLists/parserErrorRecovery_VariableList1.ts (2 errors) ==== var a, ~ !!! Trailing comma not allowed. - return; \ No newline at end of file + return; + ~~~~~~ +!!! A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/tests/baselines/reference/parserNotRegex1.errors.txt b/tests/baselines/reference/parserNotRegex1.errors.txt index ccb67029604..5f302243177 100644 --- a/tests/baselines/reference/parserNotRegex1.errors.txt +++ b/tests/baselines/reference/parserNotRegex1.errors.txt @@ -4,6 +4,6 @@ !!! Cannot find name 'a'. { return true; - ~~~~~~~~~~~~ -!!! 'return' statement has no containing function. + ~~~~~~ +!!! A 'return' statement can only be used within a function body. } \ No newline at end of file diff --git a/tests/baselines/reference/parserNotRegex1.js b/tests/baselines/reference/parserNotRegex1.js deleted file mode 100644 index 1169640d850..00000000000 --- a/tests/baselines/reference/parserNotRegex1.js +++ /dev/null @@ -1,10 +0,0 @@ -//// [parserNotRegex1.ts] - if (a.indexOf(-(4/3))) // We should not get a regex here becuase of the / in the comment. - { - return true; - } - -//// [parserNotRegex1.js] -if (a.indexOf(-(4 / 3))) { - return true; -} diff --git a/tests/baselines/reference/parserPublicBreak1.errors.txt b/tests/baselines/reference/parserPublicBreak1.errors.txt index af0ddd96ae3..afd0cd5df74 100644 --- a/tests/baselines/reference/parserPublicBreak1.errors.txt +++ b/tests/baselines/reference/parserPublicBreak1.errors.txt @@ -1,5 +1,7 @@ -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserPublicBreak1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserPublicBreak1.ts (2 errors) ==== public break; ~~~~~~ !!! Declaration or statement expected. + ~~~~~ +!!! A 'break' statement can only be used within an enclosing iteration or switch statement. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpression1.errors.txt b/tests/baselines/reference/parserRegularExpression1.errors.txt index e2def505e32..f14e8c33120 100644 --- a/tests/baselines/reference/parserRegularExpression1.errors.txt +++ b/tests/baselines/reference/parserRegularExpression1.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpression1.ts (1 errors) ==== return /(#?-?\d*\.\d\w*%?)|(@?#?[\w-?]+%?)/g; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'return' statement has no containing function. \ No newline at end of file + ~~~~~~ +!!! A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpression1.js b/tests/baselines/reference/parserRegularExpression1.js deleted file mode 100644 index eb6fe1b7c8a..00000000000 --- a/tests/baselines/reference/parserRegularExpression1.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [parserRegularExpression1.ts] -return /(#?-?\d*\.\d\w*%?)|(@?#?[\w-?]+%?)/g; - -//// [parserRegularExpression1.js] -return /(#?-?\d*\.\d\w*%?)|(@?#?[\w-?]+%?)/g; diff --git a/tests/baselines/reference/parserReturnStatement1.d.errors.txt b/tests/baselines/reference/parserReturnStatement1.d.errors.txt index d5b47b3e933..bbacb5d6c57 100644 --- a/tests/baselines/reference/parserReturnStatement1.d.errors.txt +++ b/tests/baselines/reference/parserReturnStatement1.d.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/conformance/parser/ecmascript5/Statements/parserReturnStatement1.d.ts (1 errors) ==== return; ~~~~~~ -!!! Statements are not allowed in ambient contexts. \ No newline at end of file +!!! A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/tests/baselines/reference/parserReturnStatement1.errors.txt b/tests/baselines/reference/parserReturnStatement1.errors.txt new file mode 100644 index 00000000000..7a3adc21aca --- /dev/null +++ b/tests/baselines/reference/parserReturnStatement1.errors.txt @@ -0,0 +1,4 @@ +==== tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement1.ts (1 errors) ==== + return; + ~~~~~~ +!!! A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/tests/baselines/reference/parserReturnStatement1.js b/tests/baselines/reference/parserReturnStatement1.js deleted file mode 100644 index 10ee6d83935..00000000000 --- a/tests/baselines/reference/parserReturnStatement1.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [parserReturnStatement1.ts] -return; - -//// [parserReturnStatement1.js] -return; diff --git a/tests/baselines/reference/parserReturnStatement2.errors.txt b/tests/baselines/reference/parserReturnStatement2.errors.txt new file mode 100644 index 00000000000..f887561d72c --- /dev/null +++ b/tests/baselines/reference/parserReturnStatement2.errors.txt @@ -0,0 +1,6 @@ +==== tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement2.ts (1 errors) ==== + { + return; + ~~~~~~ +!!! A 'return' statement can only be used within a function body. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserReturnStatement2.js b/tests/baselines/reference/parserReturnStatement2.js deleted file mode 100644 index b54cf2b5acd..00000000000 --- a/tests/baselines/reference/parserReturnStatement2.js +++ /dev/null @@ -1,9 +0,0 @@ -//// [parserReturnStatement2.ts] -{ - return; -} - -//// [parserReturnStatement2.js] -{ - return; -} diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt index 604acb796eb..0d8f7d23d3b 100644 --- a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt @@ -1,22 +1,13 @@ ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts (1 errors) ==== return { - ~~~~~~~~ - + ~~~~~~ +!!! A 'return' statement can only be used within a function body. "set": function (key, value) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // 'private' should not be considered a member variable here. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ private[key] = value; - ~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~~~ - - }; - ~~ -!!! 'return' statement has no containing function. \ No newline at end of file + }; \ No newline at end of file diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.js b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.js deleted file mode 100644 index 333e1824db7..00000000000 --- a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.js +++ /dev/null @@ -1,18 +0,0 @@ -//// [parserStatementIsNotAMemberVariableDeclaration1.ts] -return { - - "set": function (key, value) { - - // 'private' should not be considered a member variable here. - private[key] = value; - - } - -}; - -//// [parserStatementIsNotAMemberVariableDeclaration1.js] -return { - "set": function (key, value) { - private[key] = value; - } -}; diff --git a/tests/baselines/reference/parserWithStatement2.errors.txt b/tests/baselines/reference/parserWithStatement2.errors.txt index aa87edfd36c..9212d1b27dd 100644 --- a/tests/baselines/reference/parserWithStatement2.errors.txt +++ b/tests/baselines/reference/parserWithStatement2.errors.txt @@ -1,5 +1,7 @@ -==== tests/cases/conformance/parser/ecmascript5/Statements/parserWithStatement2.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserWithStatement2.ts (2 errors) ==== with (1) ~ !!! All symbols within a 'with' block will be resolved to 'any'. - return; \ No newline at end of file + return; + ~~~~~~ +!!! A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/tests/baselines/reference/parserWithStatement2.js b/tests/baselines/reference/parserWithStatement2.js deleted file mode 100644 index be3ed9c6c24..00000000000 --- a/tests/baselines/reference/parserWithStatement2.js +++ /dev/null @@ -1,7 +0,0 @@ -//// [parserWithStatement2.ts] -with (1) - return; - -//// [parserWithStatement2.js] -with (1) - return; diff --git a/tests/baselines/reference/parser_breakNotInIterationOrSwitchStatement1.js b/tests/baselines/reference/parser_breakNotInIterationOrSwitchStatement1.js deleted file mode 100644 index 9ed3e677f9f..00000000000 --- a/tests/baselines/reference/parser_breakNotInIterationOrSwitchStatement1.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [parser_breakNotInIterationOrSwitchStatement1.ts] -break; - -//// [parser_breakNotInIterationOrSwitchStatement1.js] -break; diff --git a/tests/baselines/reference/parser_breakNotInIterationOrSwitchStatement2.js b/tests/baselines/reference/parser_breakNotInIterationOrSwitchStatement2.js deleted file mode 100644 index b95bfca8404..00000000000 --- a/tests/baselines/reference/parser_breakNotInIterationOrSwitchStatement2.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [parser_breakNotInIterationOrSwitchStatement2.ts] -while (true) { - function f() { - break; - } -} - -//// [parser_breakNotInIterationOrSwitchStatement2.js] -while (true) { - function f() { - break; - } -} diff --git a/tests/baselines/reference/parser_continueNotInIterationStatement1.js b/tests/baselines/reference/parser_continueNotInIterationStatement1.js deleted file mode 100644 index 824a99d9e37..00000000000 --- a/tests/baselines/reference/parser_continueNotInIterationStatement1.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [parser_continueNotInIterationStatement1.ts] -continue; - -//// [parser_continueNotInIterationStatement1.js] -continue; diff --git a/tests/baselines/reference/parser_continueNotInIterationStatement2.js b/tests/baselines/reference/parser_continueNotInIterationStatement2.js deleted file mode 100644 index 690c3fd910d..00000000000 --- a/tests/baselines/reference/parser_continueNotInIterationStatement2.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [parser_continueNotInIterationStatement2.ts] -while (true) { - function f() { - continue; - } -} - -//// [parser_continueNotInIterationStatement2.js] -while (true) { - function f() { - continue; - } -} diff --git a/tests/baselines/reference/parser_continueNotInIterationStatement3.js b/tests/baselines/reference/parser_continueNotInIterationStatement3.js deleted file mode 100644 index d5cf6feb221..00000000000 --- a/tests/baselines/reference/parser_continueNotInIterationStatement3.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [parser_continueNotInIterationStatement3.ts] -switch (0) { - default: - continue; -} - -//// [parser_continueNotInIterationStatement3.js] -switch (0) { - default: - continue; -} diff --git a/tests/baselines/reference/propertyWrappedInTry.errors.txt b/tests/baselines/reference/propertyWrappedInTry.errors.txt index f3a4c14f538..1f8b5b1a1f9 100644 --- a/tests/baselines/reference/propertyWrappedInTry.errors.txt +++ b/tests/baselines/reference/propertyWrappedInTry.errors.txt @@ -26,8 +26,8 @@ !!! Cannot find name 'baz'. return this.bar; // doesn't get rewritten to Foo.bar. - ~~~~~~~~~~~~~~~~ -!!! 'return' statement has no containing function. + ~~~~~~ +!!! A 'return' statement can only be used within a function body. } diff --git a/tests/baselines/reference/switchStatementsWithMultipleDefaults.errors.txt b/tests/baselines/reference/switchStatementsWithMultipleDefaults.errors.txt index 2ddcc832e02..e84c4cdcc0e 100644 --- a/tests/baselines/reference/switchStatementsWithMultipleDefaults.errors.txt +++ b/tests/baselines/reference/switchStatementsWithMultipleDefaults.errors.txt @@ -1,4 +1,4 @@ -==== tests/cases/compiler/switchStatementsWithMultipleDefaults.ts (8 errors) ==== +==== tests/cases/compiler/switchStatementsWithMultipleDefaults.ts (9 errors) ==== var x = 10; @@ -39,6 +39,8 @@ default: return; ~~~~~~~~ !!! A 'default' clause cannot appear more than once in a 'switch' statement. + ~~~~~~ +!!! A 'return' statement can only be used within a function body. default: default: ~~~~~~~~ !!! A 'default' clause cannot appear more than once in a 'switch' statement. diff --git a/tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakNotInIterationOrSwitchStatement1.ts b/tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakNotInIterationOrSwitchStatement1.ts deleted file mode 100644 index 8cb76cf02d7..00000000000 --- a/tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakNotInIterationOrSwitchStatement1.ts +++ /dev/null @@ -1 +0,0 @@ -break; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakNotInIterationOrSwitchStatement2.ts b/tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakNotInIterationOrSwitchStatement2.ts deleted file mode 100644 index 7d4c337e29f..00000000000 --- a/tests/cases/conformance/parser/ecmascript5/Statements/BreakStatements/parser_breakNotInIterationOrSwitchStatement2.ts +++ /dev/null @@ -1,5 +0,0 @@ -while (true) { - function f() { - break; - } -} \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement1.ts b/tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement1.ts deleted file mode 100644 index 45127c0ad12..00000000000 --- a/tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement1.ts +++ /dev/null @@ -1 +0,0 @@ -continue; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement2.ts b/tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement2.ts deleted file mode 100644 index 114c300a70e..00000000000 --- a/tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement2.ts +++ /dev/null @@ -1,5 +0,0 @@ -while (true) { - function f() { - continue; - } -} \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement3.ts b/tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement3.ts deleted file mode 100644 index 203a3477af9..00000000000 --- a/tests/cases/conformance/parser/ecmascript5/Statements/ContinueStatements/parser_continueNotInIterationStatement3.ts +++ /dev/null @@ -1,4 +0,0 @@ -switch (0) { - default: - continue; -} \ No newline at end of file