From fdfd8d486352b557701122cd195a125ebc6fa906 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 16 Dec 2014 19:11:07 -0800 Subject: [PATCH] Cleaning up migrating grammar checking --- src/compiler/checker.ts | 43 ++- src/compiler/parser.ts | 1 + .../FunctionDeclaration7_es6.errors.txt | 5 +- .../FunctionDeclaration9_es6.errors.txt | 5 +- ...unctionPropertyAssignments5_es6.errors.txt | 6 +- .../MemberFunctionDeclaration3_es6.errors.txt | 5 +- .../VariableDeclaration2_es6.errors.txt | 7 +- .../VariableDeclaration4_es6.errors.txt | 7 +- .../YieldExpression10_es6.errors.txt | 5 +- .../YieldExpression11_es6.errors.txt | 5 +- .../YieldExpression13_es6.errors.txt | 7 +- .../YieldExpression16_es6.errors.txt | 5 +- .../YieldExpression17_es6.errors.txt | 7 +- .../YieldExpression19_es6.errors.txt | 8 +- .../reference/YieldExpression3_es6.errors.txt | 8 +- .../reference/YieldExpression4_es6.errors.txt | 8 +- .../reference/YieldExpression6_es6.errors.txt | 5 +- .../reference/YieldExpression7_es6.errors.txt | 5 +- .../reference/YieldExpression8_es6.errors.txt | 9 +- .../reference/YieldExpression9_es6.errors.txt | 5 +- .../reference/ambientErrors.errors.txt | 23 +- .../ambientWithStatements.errors.txt | 45 +-- .../reference/badArraySyntax.errors.txt | 5 +- ...omputedPropertyNamesOnOverloads.errors.txt | 8 +- ...nstDeclarations-invalidContexts.errors.txt | 5 +- .../constructorOverloads6.errors.txt | 4 +- .../reference/exportAlreadySeen.errors.txt | 14 +- tests/baselines/reference/giant.errors.txt | 270 ++++-------------- .../initializersInDeclarations.errors.txt | 2 +- .../invalidDoWhileBreakStatements.errors.txt | 4 +- ...nvalidDoWhileContinueStatements.errors.txt | 4 +- .../invalidForBreakStatements.errors.txt | 4 +- .../invalidForContinueStatements.errors.txt | 4 +- .../invalidForInBreakStatements.errors.txt | 4 +- .../invalidForInContinueStatements.errors.txt | 4 +- .../invalidWhileBreakStatements.errors.txt | 4 +- .../invalidWhileContinueStatements.errors.txt | 4 +- ...letDeclarations-invalidContexts.errors.txt | 5 +- .../missingRequiredDeclare.d.errors.txt | 7 +- .../reference/newOperator.errors.txt | 5 +- .../objectLiteralGettersAndSetters.errors.txt | 4 +- .../reference/parser618973.errors.txt | 6 +- .../parserBreakStatement1.d.errors.txt | 7 +- .../parserClassDeclaration18.errors.txt | 4 +- .../parserComputedPropertyName11.errors.txt | 5 +- .../parserComputedPropertyName14.errors.txt | 7 +- .../parserComputedPropertyName18.errors.txt | 7 +- .../parserComputedPropertyName20.errors.txt | 5 +- .../parserComputedPropertyName23.errors.txt | 5 +- .../parserComputedPropertyName32.errors.txt | 5 +- .../parserConstructorDeclaration11.errors.txt | 5 +- .../parserConstructorDeclaration12.errors.txt | 26 +- .../parserConstructorDeclaration4.errors.txt | 5 +- .../parserContinueStatement1.d.errors.txt | 7 +- ...parserES5ComputedPropertyName11.errors.txt | 5 +- .../parserFunctionDeclaration2.d.errors.txt | 5 +- .../parserFunctionDeclaration2.errors.txt | 4 +- ...arserMemberFunctionDeclaration5.errors.txt | 5 +- .../parserModuleDeclaration4.d.errors.txt | 5 +- .../parserReturnStatement1.d.errors.txt | 7 +- .../parserVariableStatement1.d.errors.txt | 7 +- .../reference/parserWithStatement2.errors.txt | 7 +- .../reference/parserWithStatement2.js | 7 + .../semicolonsInModuleDeclarations.errors.txt | 5 +- ...hStatementsWithMultipleDefaults.errors.txt | 5 +- ...tringsWithIncompatibleTypedTags.errors.txt | 11 +- ...mplateStringsWithTagsTypedAsAny.errors.txt | 8 +- ...gedTemplateStringsWithTypedTags.errors.txt | 8 +- .../templateStringInYieldKeyword.errors.txt | 5 +- ...ringWithEmbeddedYieldKeywordES6.errors.txt | 5 +- .../reference/yieldExpression1.errors.txt | 5 +- 71 files changed, 388 insertions(+), 395 deletions(-) create mode 100644 tests/baselines/reference/parserWithStatement2.js diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cbdab2e0c11..633d1a8299d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7225,13 +7225,13 @@ module ts { function checkMethodDeclaration(node: MethodDeclaration) { // Grammar checking - // Grammar checking for modifiers is done inside the function checkGrammarFunctionLikeDeclaration checkGrammarMethod(node); if (node.name.kind === SyntaxKind.ComputedPropertyName) { checkGrammarComputedPropertyName(node.name); } + // Grammar checking for modifiers is done inside the function checkGrammarFunctionLikeDeclaration checkFunctionLikeDeclaration(node); } @@ -7239,7 +7239,7 @@ module ts { // Grammar check on signature of constructor and modifier of the constructor is done in checkSignatureDeclaration function. checkSignatureDeclaration(node); // Grammar check for checking only related to constructoDeclaration - checkGrammarConstructorTypeParameters(node) || checkGrammarConstructorTypeAnnotation(node) || checkGrammarForBodyInAmbientContext(node.body, /*isConstructor:*/ true); + checkGrammarConstructorTypeParameters(node) || checkGrammarConstructorTypeAnnotation(node); checkSourceElement(node.body); @@ -7764,7 +7764,7 @@ module ts { // Grammar Checking, check signature of function declaration as checkFunctionLikeDeclaration call checkGarmmarFunctionLikeDeclaration checkFunctionLikeDeclaration(node); //Grammar check other component of the functionDeclaration - checkGrammarFunctionName(node.name) || checkGrammarForBodyInAmbientContext(node.body, /*isConstructor*/ false) || checkGrammarForGenerator(node); + checkGrammarFunctionName(node.name) || checkGrammarForGenerator(node); if (fullTypeCheck) { checkCollisionWithCapturedSuperVariable(node, node.name); @@ -8220,12 +8220,6 @@ module ts { if (node.parserContextFlags & ParserContextFlags.StrictMode) { grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_strict_mode); } - else { - // Grammar checking for invalid use of return statement - forEachReturnStatement(node.statement, returnStatement => { - grammarErrorOnFirstToken(returnStatement, Diagnostics.A_return_statement_can_only_be_used_within_a_function_body); - }); - } checkExpression(node.expression); error(node.expression, Diagnostics.All_symbols_within_a_with_block_will_be_resolved_to_any); @@ -8669,6 +8663,9 @@ module ts { } function checkTypeAliasDeclaration(node: TypeAliasDeclaration) { + // Grammar checking + checkGrammarModifiers(node); + checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); checkSourceElement(node.type); } @@ -8959,6 +8956,9 @@ module ts { } function checkImportDeclaration(node: ImportDeclaration) { + // Grammar checking + checkGrammarModifiers(node); + checkCollisionWithCapturedThisVariable(node, node.name); checkCollisionWithRequireExportsInGeneratedCode(node, node.name); var symbol = getSymbolOfNode(node); @@ -9025,6 +9025,8 @@ module ts { function checkExportAssignment(node: ExportAssignment) { // Grammar checking + checkGrammarModifiers(node); + if (node.flags & NodeFlags.Modifier) { grammarErrorOnFirstToken(node, Diagnostics.An_export_assignment_cannot_have_modifiers); } @@ -9222,11 +9224,11 @@ module ts { // Fully type check a source file and collect the relevant diagnostics. function checkSourceFile(node: SourceFile) { - // Grammar checking - checkGrammarSourceFile(node); - var links = getNodeLinks(node); if (!(links.flags & NodeCheckFlags.TypeChecked)) { + // Grammar checking + checkGrammarSourceFile(node); + emitExtends = false; potentialThisCollisions.length = 0; @@ -10359,6 +10361,10 @@ module ts { if (prop.kind === SyntaxKind.PropertyAssignment || prop.kind === SyntaxKind.ShorthandPropertyAssignment) { // Grammar checking for computedPropertName and shorthandPropertyAssignment checkGrammarForInvalidQuestionMark(prop,(prop).questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); + if (name.kind === SyntaxKind.NumericLiteral) { + } + else if (name.kind === SyntaxKind.StringLiteral) { + } currentKind = Property; } else if ( prop.kind === SyntaxKind.MethodDeclaration) { @@ -10734,7 +10740,7 @@ module ts { var diagnostic = isConstructor ? Diagnostics.A_constructor_implementation_cannot_be_declared_in_an_ambient_context : Diagnostics.A_function_implementation_cannot_be_declared_in_an_ambient_context; - return grammarErrorOnFirstToken(body, diagnostic); + return getNodeLinks(body).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(body, diagnostic); } } @@ -10800,9 +10806,16 @@ module ts { function checkGrammarForStatementInAmbientContext(node: Node): void { if (isInAmbientContext(node)) { + // An accessors is already reported about the ambient context + if (isAccessor(node.parent.kind)) { + getNodeLinks(node).hasReportedStatementInAmbientContext = true; + return; + } + // Find containing block which is either Block, ModuleBlock, SourceFile - if (isAnyFunction(node.parent)) { - grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts) + var links = getNodeLinks(node); + if (!links.hasReportedStatementInAmbientContext && isAnyFunction(node.parent)) { + getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts) return; } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 3549afe5ef4..d2e8000a2fd 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3988,6 +3988,7 @@ module ts { } function checkGrammar(sourceText: string, languageVersion: ScriptTarget, file: SourceFile) { + return; var grammarDiagnostics = file.grammarDiagnostics; // Create a scanner so we can find the start of tokens to report errors on. diff --git a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt index 71aff1e2488..f129d3fa30b 100644 --- a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt @@ -1,13 +1,16 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,11): error TS9001: Generators are not currently supported. tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2304: Cannot find name 'yield'. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (2 errors) ==== +==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (3 errors) ==== function*bar() { ~ !!! error TS9001: Generators are not currently supported. // 'yield' here is an identifier, and not a yield expression. function*foo(a = yield) { + ~ +!!! error TS9001: Generators are not currently supported. ~~~~~ !!! error TS2304: Cannot find name 'yield'. } diff --git a/tests/baselines/reference/FunctionDeclaration9_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration9_es6.errors.txt index 8de32cf0a00..8333eceb267 100644 --- a/tests/baselines/reference/FunctionDeclaration9_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration9_es6.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts(1,10): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts(2,13): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts (2 errors) ==== function * foo() { ~ !!! error TS9001: Generators are not currently supported. var v = { [yield]: foo } + ~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt b/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt index 393ede66a60..eff0c79d827 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,11): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,12): error TS9002: Computed property names are not currently supported. ==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts (1 errors) ==== var v = { *[foo()]() { } } - ~ -!!! error TS9001: Generators are not currently supported. \ No newline at end of file + ~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt index b43e266e2a5..ef45ee3f9cb 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,4): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,5): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts (2 errors) ==== class C { *[foo]() { } ~ !!! error TS9001: Generators are not currently supported. + ~~~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration2_es6.errors.txt b/tests/baselines/reference/VariableDeclaration2_es6.errors.txt index 362b68dbb35..1ae59205204 100644 --- a/tests/baselines/reference/VariableDeclaration2_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration2_es6.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts(1,7): error TS1155: 'const' declarations must be initialized -==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts (2 errors) ==== const a ~ -!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file +!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. + ~ +!!! error TS1155: 'const' declarations must be initialized \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration4_es6.errors.txt b/tests/baselines/reference/VariableDeclaration4_es6.errors.txt index ae035825312..8bb7692fb5f 100644 --- a/tests/baselines/reference/VariableDeclaration4_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration4_es6.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts(1,7): error TS1155: 'const' declarations must be initialized -==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts (2 errors) ==== const a: number ~ -!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file +!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. + ~ +!!! error TS1155: 'const' declarations must be initialized \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression10_es6.errors.txt b/tests/baselines/reference/YieldExpression10_es6.errors.txt index 41d6bb5bf24..e0d7ea4ad27 100644 --- a/tests/baselines/reference/YieldExpression10_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression10_es6.errors.txt @@ -1,11 +1,14 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts(1,11): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts(2,5): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts (2 errors) ==== var v = { * foo() { ~ !!! error TS9001: Generators are not currently supported. yield(foo); + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression11_es6.errors.txt b/tests/baselines/reference/YieldExpression11_es6.errors.txt index eea108619bc..3f322a81f2f 100644 --- a/tests/baselines/reference/YieldExpression11_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression11_es6.errors.txt @@ -1,11 +1,14 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(2,3): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(3,5): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts (2 errors) ==== class C { *foo() { ~ !!! error TS9001: Generators are not currently supported. yield(foo); + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression13_es6.errors.txt b/tests/baselines/reference/YieldExpression13_es6.errors.txt index 185fb2f6193..fc2d885d381 100644 --- a/tests/baselines/reference/YieldExpression13_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression13_es6.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts(1,19): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts (2 errors) ==== function* foo() { yield } ~ -!!! error TS9001: Generators are not currently supported. \ No newline at end of file +!!! error TS9001: Generators are not currently supported. + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression16_es6.errors.txt b/tests/baselines/reference/YieldExpression16_es6.errors.txt index 54536a7d4fe..c0d2e4c8fc8 100644 --- a/tests/baselines/reference/YieldExpression16_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression16_es6.errors.txt @@ -1,11 +1,14 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(3,5): error TS1163: 'yield' expression must be contained_within a generator declaration. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts (2 errors) ==== function* foo() { ~ !!! error TS9001: Generators are not currently supported. function bar() { yield foo; + ~~~~~ +!!! error TS1163: 'yield' expression must be contained_within a generator declaration. } } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression17_es6.errors.txt b/tests/baselines/reference/YieldExpression17_es6.errors.txt index 38969a9c6fb..b39f47b07f9 100644 --- a/tests/baselines/reference/YieldExpression17_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression17_es6.errors.txt @@ -1,10 +1,13 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,15): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,23): error TS1163: 'yield' expression must be contained_within a generator declaration. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts (2 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts (3 errors) ==== var v = { get foo() { yield foo; } } ~~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. \ No newline at end of file +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + ~~~~~ +!!! error TS1163: 'yield' expression must be contained_within a generator declaration. \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression19_es6.errors.txt b/tests/baselines/reference/YieldExpression19_es6.errors.txt index 81cf0e2063c..9d04d9559b0 100644 --- a/tests/baselines/reference/YieldExpression19_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression19_es6.errors.txt @@ -1,13 +1,19 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts(3,13): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts(4,7): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts (3 errors) ==== function*foo() { ~ !!! error TS9001: Generators are not currently supported. function bar() { function* quux() { + ~ +!!! error TS9001: Generators are not currently supported. yield(foo); + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } } } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression3_es6.errors.txt b/tests/baselines/reference/YieldExpression3_es6.errors.txt index 91da79fbb53..1e284c92786 100644 --- a/tests/baselines/reference/YieldExpression3_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression3_es6.errors.txt @@ -1,10 +1,16 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts(2,3): error TS9000: 'yield' expressions are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts(3,3): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts (3 errors) ==== function* foo() { ~ !!! error TS9001: Generators are not currently supported. yield + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. yield + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression4_es6.errors.txt b/tests/baselines/reference/YieldExpression4_es6.errors.txt index ca7ed3d354c..2d2a7ca3257 100644 --- a/tests/baselines/reference/YieldExpression4_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression4_es6.errors.txt @@ -1,10 +1,16 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts(2,3): error TS9000: 'yield' expressions are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts(3,3): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts (3 errors) ==== function* foo() { ~ !!! error TS9001: Generators are not currently supported. yield; + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. yield; + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression6_es6.errors.txt b/tests/baselines/reference/YieldExpression6_es6.errors.txt index d8ce78a300f..a3d9481601a 100644 --- a/tests/baselines/reference/YieldExpression6_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression6_es6.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts(2,3): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts (2 errors) ==== function* foo() { ~ !!! error TS9001: Generators are not currently supported. yield*foo + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression7_es6.errors.txt b/tests/baselines/reference/YieldExpression7_es6.errors.txt index 87b15ac9f71..393a03ee269 100644 --- a/tests/baselines/reference/YieldExpression7_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression7_es6.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts(2,3): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts (2 errors) ==== function* foo() { ~ !!! error TS9001: Generators are not currently supported. yield foo + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression8_es6.errors.txt b/tests/baselines/reference/YieldExpression8_es6.errors.txt index a32a3bcdc41..3f7933c5bb2 100644 --- a/tests/baselines/reference/YieldExpression8_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression8_es6.errors.txt @@ -1,12 +1,9 @@ -<<<<<<< HEAD -tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(2,9): error TS9001: Generators are not currently supported. -======= ->>>>>>> master tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(1,1): error TS2304: Cannot find name 'yield'. tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(2,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(3,3): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts (2 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts (3 errors) ==== yield(foo); ~~~~~ !!! error TS2304: Cannot find name 'yield'. @@ -14,4 +11,6 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(2,9): error ~ !!! error TS9001: Generators are not currently supported. yield(foo); + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression9_es6.errors.txt b/tests/baselines/reference/YieldExpression9_es6.errors.txt index ae1b105903a..cd753647327 100644 --- a/tests/baselines/reference/YieldExpression9_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression9_es6.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts(1,17): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts(2,3): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts (2 errors) ==== var v = function*() { ~ !!! error TS9001: Generators are not currently supported. yield(foo); + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientErrors.errors.txt b/tests/baselines/reference/ambientErrors.errors.txt index 08f6037fcbb..eb06b785914 100644 --- a/tests/baselines/reference/ambientErrors.errors.txt +++ b/tests/baselines/reference/ambientErrors.errors.txt @@ -1,19 +1,14 @@ tests/cases/conformance/ambient/ambientErrors.ts(2,15): error TS1039: Initializers are not allowed in ambient contexts. tests/cases/conformance/ambient/ambientErrors.ts(6,1): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/ambient/ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -<<<<<<< HEAD -tests/cases/conformance/ambient/ambientErrors.ts(20,24): error TS1036: Statements are not allowed in ambient contexts. -======= ->>>>>>> master -tests/cases/conformance/ambient/ambientErrors.ts(20,24): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/conformance/ambient/ambientErrors.ts(20,24): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/conformance/ambient/ambientErrors.ts(24,5): error TS1066: Ambient enum elements can only have integer literal initializers. tests/cases/conformance/ambient/ambientErrors.ts(29,5): error TS1066: Ambient enum elements can only have integer literal initializers. tests/cases/conformance/ambient/ambientErrors.ts(34,11): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(35,19): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(35,19): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/conformance/ambient/ambientErrors.ts(35,19): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/conformance/ambient/ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts. tests/cases/conformance/ambient/ambientErrors.ts(38,13): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(39,23): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/conformance/ambient/ambientErrors.ts(39,23): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/conformance/ambient/ambientErrors.ts(40,14): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/conformance/ambient/ambientErrors.ts(41,22): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/conformance/ambient/ambientErrors.ts(47,20): error TS2435: Ambient external modules cannot be nested in other modules. @@ -21,7 +16,7 @@ tests/cases/conformance/ambient/ambientErrors.ts(51,16): error TS2436: Ambient e tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. -==== tests/cases/conformance/ambient/ambientErrors.ts (18 errors) ==== +==== tests/cases/conformance/ambient/ambientErrors.ts (16 errors) ==== // Ambient variable with an initializer declare var x = 4; ~ @@ -49,9 +44,7 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export // Ambient function with function body declare function fn4() { }; ~ -!!! error TS1036: Statements are not allowed in ambient contexts. - ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. // Ambient enum with non - integer literal constant member declare enum E1 { @@ -74,9 +67,7 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export !!! error TS1039: Initializers are not allowed in ambient contexts. function fn() { } ~ -!!! error TS1036: Statements are not allowed in ambient contexts. - ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. class C { static x = 3; ~ @@ -86,7 +77,7 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export !!! error TS1039: Initializers are not allowed in ambient contexts. constructor() { } ~ -!!! error TS1111: A constructor implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. fn() { } ~ !!! error TS1037: A function implementation cannot be declared in an ambient context. diff --git a/tests/baselines/reference/ambientWithStatements.errors.txt b/tests/baselines/reference/ambientWithStatements.errors.txt index 2b592feb775..2179b3efb04 100644 --- a/tests/baselines/reference/ambientWithStatements.errors.txt +++ b/tests/baselines/reference/ambientWithStatements.errors.txt @@ -1,74 +1,47 @@ tests/cases/compiler/ambientWithStatements.ts(2,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(3,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(4,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(5,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(7,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(2,5): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. +tests/cases/compiler/ambientWithStatements.ts(3,5): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. tests/cases/compiler/ambientWithStatements.ts(7,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. -tests/cases/compiler/ambientWithStatements.ts(8,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(9,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(10,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(11,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(12,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(18,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(19,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(25,5): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/ambientWithStatements.ts(11,5): error TS1108: A 'return' statement can only be used within a function body. tests/cases/compiler/ambientWithStatements.ts(25,11): error TS2410: All symbols within a 'with' block will be resolved to 'any'. -==== tests/cases/compiler/ambientWithStatements.ts (15 errors) ==== +==== tests/cases/compiler/ambientWithStatements.ts (6 errors) ==== declare module M { break; ~~~~~ !!! error TS1036: Statements are not allowed in ambient contexts. + ~~~~~~ +!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. continue; - ~~~~~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. + ~~~~~~~~~ +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. debugger; - ~~~~~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. do { } while (true); - ~~ -!!! error TS1036: Statements are not allowed in ambient contexts. var x; for (x in null) { } - ~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. ~~~~ !!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. if (true) { } else { } - ~~ -!!! error TS1036: Statements are not allowed in ambient contexts. 1; - ~ -!!! error TS1036: Statements are not allowed in ambient contexts. L: var y; - ~ -!!! error TS1036: Statements are not allowed in ambient contexts. return; ~~~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. +!!! error TS1108: A 'return' statement can only be used within a function body. switch (x) { - ~~~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. case 1: break; default: break; } throw "nooo"; - ~~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. try { - ~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. } catch (e) { } finally { } with (x) { - ~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. ~ !!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. } diff --git a/tests/baselines/reference/badArraySyntax.errors.txt b/tests/baselines/reference/badArraySyntax.errors.txt index b22097253fc..3c6b28408f2 100644 --- a/tests/baselines/reference/badArraySyntax.errors.txt +++ b/tests/baselines/reference/badArraySyntax.errors.txt @@ -2,10 +2,11 @@ tests/cases/compiler/badArraySyntax.ts(6,15): error TS1150: 'new T[]' cannot be tests/cases/compiler/badArraySyntax.ts(7,15): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/badArraySyntax.ts(8,20): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/badArraySyntax.ts(9,20): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +tests/cases/compiler/badArraySyntax.ts(10,36): error TS1109: Expression expected. tests/cases/compiler/badArraySyntax.ts(10,40): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -==== tests/cases/compiler/badArraySyntax.ts (5 errors) ==== +==== tests/cases/compiler/badArraySyntax.ts (6 errors) ==== class Z { public x = ""; } @@ -24,6 +25,8 @@ tests/cases/compiler/badArraySyntax.ts(10,40): error TS1150: 'new T[]' cannot be ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var a6: Z[][] = new Z [ ] [ ]; + ~ +!!! error TS1109: Expression expected. ~~~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads.errors.txt b/tests/baselines/reference/computedPropertyNamesOnOverloads.errors.txt index 6329ab39f0f..edd7a19a957 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads.errors.txt +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads.errors.txt @@ -1,18 +1,24 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(4,5): error TS1168: Computed property names are not allowed in method overloads. +tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(4,5): error TS9002: Computed property names are not currently supported. tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(5,5): error TS1168: Computed property names are not allowed in method overloads. +tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(5,5): error TS9002: Computed property names are not currently supported. tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(6,5): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts (3 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts (5 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName](v: string); ~~~~~~~~~~~~ !!! error TS1168: Computed property names are not allowed in method overloads. + ~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. [methodName](); ~~~~~~~~~~~~ !!! error TS1168: Computed property names are not allowed in method overloads. + ~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. [methodName](v?: string) { } ~~~~~~~~~~~~ !!! error TS9002: Computed property names are not currently supported. diff --git a/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt b/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt index 930f2d8d813..87378cffe4d 100644 --- a/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt +++ b/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt @@ -3,14 +3,13 @@ tests/cases/compiler/constDeclarations-invalidContexts.ts(6,5): error TS1156: 'c tests/cases/compiler/constDeclarations-invalidContexts.ts(9,5): error TS1156: 'const' declarations can only be declared inside a block. tests/cases/compiler/constDeclarations-invalidContexts.ts(12,5): error TS1156: 'const' declarations can only be declared inside a block. tests/cases/compiler/constDeclarations-invalidContexts.ts(16,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. -tests/cases/compiler/constDeclarations-invalidContexts.ts(17,5): error TS1156: 'const' declarations can only be declared inside a block. tests/cases/compiler/constDeclarations-invalidContexts.ts(20,5): error TS1156: 'const' declarations can only be declared inside a block. tests/cases/compiler/constDeclarations-invalidContexts.ts(23,5): error TS1156: 'const' declarations can only be declared inside a block. tests/cases/compiler/constDeclarations-invalidContexts.ts(26,12): error TS1156: 'const' declarations can only be declared inside a block. tests/cases/compiler/constDeclarations-invalidContexts.ts(29,29): error TS1156: 'const' declarations can only be declared inside a block. -==== tests/cases/compiler/constDeclarations-invalidContexts.ts (10 errors) ==== +==== tests/cases/compiler/constDeclarations-invalidContexts.ts (9 errors) ==== // Errors, const must be defined inside a block if (true) @@ -38,8 +37,6 @@ tests/cases/compiler/constDeclarations-invalidContexts.ts(29,29): error TS1156: ~~~ !!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. const c5 = 0; - ~~~~~~~~~~~~~ -!!! error TS1156: 'const' declarations can only be declared inside a block. for (var i = 0; i < 10; i++) const c6 = 0; diff --git a/tests/baselines/reference/constructorOverloads6.errors.txt b/tests/baselines/reference/constructorOverloads6.errors.txt index d5cf2486fe1..65827007a8e 100644 --- a/tests/baselines/reference/constructorOverloads6.errors.txt +++ b/tests/baselines/reference/constructorOverloads6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/constructorOverloads6.ts(4,25): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/constructorOverloads6.ts(4,25): error TS1184: An implementation cannot be declared in ambient contexts. ==== tests/cases/compiler/constructorOverloads6.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/constructorOverloads6.ts(4,25): error TS1111: A constructor constructor(n: number); constructor(x: any) { ~ -!!! error TS1111: A constructor implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. } bar1():void; diff --git a/tests/baselines/reference/exportAlreadySeen.errors.txt b/tests/baselines/reference/exportAlreadySeen.errors.txt index 707b34c8d25..eb9f0ce1a95 100644 --- a/tests/baselines/reference/exportAlreadySeen.errors.txt +++ b/tests/baselines/reference/exportAlreadySeen.errors.txt @@ -1,12 +1,16 @@ tests/cases/compiler/exportAlreadySeen.ts(2,12): error TS1030: 'export' modifier already seen. tests/cases/compiler/exportAlreadySeen.ts(3,12): error TS1030: 'export' modifier already seen. tests/cases/compiler/exportAlreadySeen.ts(5,12): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(6,16): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(7,16): error TS1030: 'export' modifier already seen. tests/cases/compiler/exportAlreadySeen.ts(12,12): error TS1030: 'export' modifier already seen. tests/cases/compiler/exportAlreadySeen.ts(13,12): error TS1030: 'export' modifier already seen. tests/cases/compiler/exportAlreadySeen.ts(15,12): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(16,16): error TS1030: 'export' modifier already seen. +tests/cases/compiler/exportAlreadySeen.ts(17,16): error TS1030: 'export' modifier already seen. -==== tests/cases/compiler/exportAlreadySeen.ts (6 errors) ==== +==== tests/cases/compiler/exportAlreadySeen.ts (10 errors) ==== module M { export export var x = 1; ~~~~~~ @@ -19,7 +23,11 @@ tests/cases/compiler/exportAlreadySeen.ts(15,12): error TS1030: 'export' modifie ~~~~~~ !!! error TS1030: 'export' modifier already seen. export export class C { } + ~~~~~~ +!!! error TS1030: 'export' modifier already seen. export export interface I { } + ~~~~~~ +!!! error TS1030: 'export' modifier already seen. } } @@ -35,6 +43,10 @@ tests/cases/compiler/exportAlreadySeen.ts(15,12): error TS1030: 'export' modifie ~~~~~~ !!! error TS1030: 'export' modifier already seen. export export class C { } + ~~~~~~ +!!! error TS1030: 'export' modifier already seen. export export interface I { } + ~~~~~~ +!!! error TS1030: 'export' modifier already seen. } } \ No newline at end of file diff --git a/tests/baselines/reference/giant.errors.txt b/tests/baselines/reference/giant.errors.txt index d8239e0027a..5a356ab6f2a 100644 --- a/tests/baselines/reference/giant.errors.txt +++ b/tests/baselines/reference/giant.errors.txt @@ -17,13 +17,10 @@ tests/cases/compiler/giant.ts(35,12): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(36,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(36,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(61,5): error TS1169: Computed property names are not allowed in interfaces. -<<<<<<< HEAD -======= tests/cases/compiler/giant.ts(62,5): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(63,6): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(76,5): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(87,16): error TS2300: Duplicate identifier 'pgF'. ->>>>>>> master tests/cases/compiler/giant.ts(88,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(88,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(89,16): error TS2300: Duplicate identifier 'psF'. @@ -42,13 +39,10 @@ tests/cases/compiler/giant.ts(99,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(100,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(100,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(125,9): error TS1169: Computed property names are not allowed in interfaces. -<<<<<<< HEAD -======= tests/cases/compiler/giant.ts(126,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(127,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(140,9): error TS2386: Overload signatures must all be optional or required. ->>>>>>> master -tests/cases/compiler/giant.ts(154,39): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(154,39): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(166,16): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(167,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(167,20): error TS2300: Duplicate identifier 'pgF'. @@ -68,15 +62,12 @@ tests/cases/compiler/giant.ts(178,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(179,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(179,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(204,9): error TS1169: Computed property names are not allowed in interfaces. -<<<<<<< HEAD -======= tests/cases/compiler/giant.ts(205,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(206,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(219,9): error TS2386: Overload signatures must all be optional or required. ->>>>>>> master -tests/cases/compiler/giant.ts(233,39): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(238,35): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(240,24): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(233,39): error TS1184: An implementation cannot be declared in ambient contexts. +tests/cases/compiler/giant.ts(238,35): error TS1184: An implementation cannot be declared in ambient contexts. +tests/cases/compiler/giant.ts(240,24): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(243,21): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(244,22): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(245,16): error TS2300: Duplicate identifier 'pgF'. @@ -104,10 +95,9 @@ tests/cases/compiler/giant.ts(257,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(257,22): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(258,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(258,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(262,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(262,22): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(262,25): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/giant.ts(267,30): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(267,33): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(267,30): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(281,12): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(282,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(282,16): error TS2300: Duplicate identifier 'pgF'. @@ -127,13 +117,10 @@ tests/cases/compiler/giant.ts(293,12): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(294,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(294,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(319,5): error TS1169: Computed property names are not allowed in interfaces. -<<<<<<< HEAD -======= tests/cases/compiler/giant.ts(320,5): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(321,6): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(334,5): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(345,16): error TS2300: Duplicate identifier 'pgF'. ->>>>>>> master tests/cases/compiler/giant.ts(346,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(346,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(347,16): error TS2300: Duplicate identifier 'psF'. @@ -152,13 +139,10 @@ tests/cases/compiler/giant.ts(357,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(358,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(358,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(383,9): error TS1169: Computed property names are not allowed in interfaces. -<<<<<<< HEAD -======= tests/cases/compiler/giant.ts(384,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(385,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(398,9): error TS2386: Overload signatures must all be optional or required. ->>>>>>> master -tests/cases/compiler/giant.ts(412,39): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(412,39): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(424,16): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(425,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(425,20): error TS2300: Duplicate identifier 'pgF'. @@ -178,15 +162,12 @@ tests/cases/compiler/giant.ts(436,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(437,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(437,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(462,9): error TS1169: Computed property names are not allowed in interfaces. -<<<<<<< HEAD -======= tests/cases/compiler/giant.ts(463,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(464,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(477,9): error TS2386: Overload signatures must all be optional or required. ->>>>>>> master -tests/cases/compiler/giant.ts(491,39): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(496,35): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(498,24): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(491,39): error TS1184: An implementation cannot be declared in ambient contexts. +tests/cases/compiler/giant.ts(496,35): error TS1184: An implementation cannot be declared in ambient contexts. +tests/cases/compiler/giant.ts(498,24): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(501,21): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(502,22): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(503,16): error TS2300: Duplicate identifier 'pgF'. @@ -214,12 +195,11 @@ tests/cases/compiler/giant.ts(515,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(515,22): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(516,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(516,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(520,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(520,22): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(520,25): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/giant.ts(525,30): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(525,33): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/giant.ts(532,31): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(534,20): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(525,30): error TS1184: An implementation cannot be declared in ambient contexts. +tests/cases/compiler/giant.ts(532,31): error TS1184: An implementation cannot be declared in ambient contexts. +tests/cases/compiler/giant.ts(534,20): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(537,17): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(538,18): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(539,12): error TS2300: Duplicate identifier 'pgF'. @@ -247,181 +227,37 @@ tests/cases/compiler/giant.ts(551,12): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(551,18): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(552,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(552,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(556,18): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(556,18): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(556,21): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/giant.ts(558,24): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(558,24): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(561,21): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(563,21): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(587,9): error TS1169: Computed property names are not allowed in interfaces. -<<<<<<< HEAD -======= tests/cases/compiler/giant.ts(588,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(589,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(602,9): error TS2386: Overload signatures must all be optional or required. ->>>>>>> master -tests/cases/compiler/giant.ts(606,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(606,22): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(606,25): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/giant.ts(611,30): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(611,33): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(611,30): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(615,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. tests/cases/compiler/giant.ts(616,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. -tests/cases/compiler/giant.ts(616,42): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/giant.ts(616,39): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(617,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. tests/cases/compiler/giant.ts(618,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. -tests/cases/compiler/giant.ts(621,26): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(621,29): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/giant.ts(623,24): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(621,26): error TS1184: An implementation cannot be declared in ambient contexts. +tests/cases/compiler/giant.ts(623,24): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(626,21): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(628,21): error TS1037: A function implementation cannot be declared in an ambient context. tests/cases/compiler/giant.ts(653,9): error TS1169: Computed property names are not allowed in interfaces. -<<<<<<< HEAD -======= tests/cases/compiler/giant.ts(654,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(655,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all be optional or required. ->>>>>>> master -tests/cases/compiler/giant.ts(672,22): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/compiler/giant.ts(672,22): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(672,25): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/giant.ts(676,30): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/compiler/giant.ts(676,33): error TS1036: Statements are not allowed in ambient contexts. -<<<<<<< HEAD -tests/cases/compiler/giant.ts(23,12): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(24,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(25,12): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(26,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(27,13): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(28,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(29,13): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(30,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(33,12): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(34,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(35,12): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(36,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(62,5): error TS1021: An index signature must have a type annotation. -tests/cases/compiler/giant.ts(63,6): error TS1096: An index signature must have exactly one parameter. -tests/cases/compiler/giant.ts(76,5): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(87,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(88,20): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(89,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(90,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(91,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(92,21): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(93,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(94,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(97,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(98,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(99,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(100,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(126,9): error TS1021: An index signature must have a type annotation. -tests/cases/compiler/giant.ts(127,10): error TS1096: An index signature must have exactly one parameter. -tests/cases/compiler/giant.ts(140,9): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(166,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(167,20): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(168,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(169,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(170,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(171,21): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(172,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(173,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(176,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(177,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(178,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(179,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(205,9): error TS1021: An index signature must have a type annotation. -tests/cases/compiler/giant.ts(206,10): error TS1096: An index signature must have exactly one parameter. -tests/cases/compiler/giant.ts(219,9): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(245,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(246,20): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(247,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(248,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(249,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(250,21): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(251,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(252,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(255,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(256,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(257,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(258,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(281,12): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(282,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(283,12): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(284,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(285,13): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(286,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(287,13): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(288,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(291,12): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(292,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(293,12): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(294,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(320,5): error TS1021: An index signature must have a type annotation. -tests/cases/compiler/giant.ts(321,6): error TS1096: An index signature must have exactly one parameter. -tests/cases/compiler/giant.ts(334,5): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(345,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(346,20): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(347,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(348,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(349,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(350,21): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(351,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(352,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(355,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(356,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(357,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(358,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(384,9): error TS1021: An index signature must have a type annotation. -tests/cases/compiler/giant.ts(385,10): error TS1096: An index signature must have exactly one parameter. -tests/cases/compiler/giant.ts(398,9): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(424,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(425,20): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(426,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(427,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(428,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(429,21): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(430,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(431,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(434,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(435,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(436,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(437,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(463,9): error TS1021: An index signature must have a type annotation. -tests/cases/compiler/giant.ts(464,10): error TS1096: An index signature must have exactly one parameter. -tests/cases/compiler/giant.ts(477,9): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(503,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(504,20): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(505,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(506,20): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(507,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(508,21): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(509,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(510,21): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(513,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(514,20): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(515,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(516,20): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(539,12): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(540,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(541,12): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(542,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(543,13): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(544,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(545,13): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(546,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(549,12): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(550,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(551,12): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(552,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(588,9): error TS1021: An index signature must have a type annotation. -tests/cases/compiler/giant.ts(589,10): error TS1096: An index signature must have exactly one parameter. -tests/cases/compiler/giant.ts(602,9): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/giant.ts(654,9): error TS1021: An index signature must have a type annotation. -tests/cases/compiler/giant.ts(655,10): error TS1096: An index signature must have exactly one parameter. -tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all be optional or required. -======= ->>>>>>> master +tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be declared in ambient contexts. -==== tests/cases/compiler/giant.ts (262 errors) ==== +==== tests/cases/compiler/giant.ts (257 errors) ==== /* Prefixes @@ -665,7 +501,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export declare var eaV; export declare function eaF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export declare class eaC { }; export declare module eaM { }; } @@ -790,18 +626,18 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export declare var eaV; export declare function eaF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export declare class eaC { }; export declare module eaM { }; } export declare var eaV; export declare function eaF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export declare class eaC { constructor () { } ~ -!!! error TS1111: A constructor implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. public pV; private rV; public pF() { } @@ -879,7 +715,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all var V; function F() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. ~ !!! error TS1036: Statements are not allowed in ambient contexts. class C { } @@ -888,9 +724,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export var eV; export function eF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. - ~ -!!! error TS1036: Statements are not allowed in ambient contexts. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export class eC { } export interface eI { } export module eM { } @@ -1125,7 +959,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export declare var eaV; export declare function eaF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export declare class eaC { }; export declare module eaM { }; } @@ -1250,18 +1084,18 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export declare var eaV; export declare function eaF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export declare class eaC { }; export declare module eaM { }; } export declare var eaV; export declare function eaF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export declare class eaC { constructor () { } ~ -!!! error TS1111: A constructor implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. public pV; private rV; public pF() { } @@ -1339,7 +1173,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all var V; function F() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. ~ !!! error TS1036: Statements are not allowed in ambient contexts. class C { } @@ -1348,9 +1182,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export var eV; export function eF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. - ~ -!!! error TS1036: Statements are not allowed in ambient contexts. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export class eC { } export interface eI { } export module eM { } @@ -1359,11 +1191,11 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export declare var eaV; export declare function eaF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export declare class eaC { constructor () { } ~ -!!! error TS1111: A constructor implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. public pV; private rV; public pF() { } @@ -1441,13 +1273,13 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all var V; function F() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. ~ !!! error TS1036: Statements are not allowed in ambient contexts. class C { constructor () { } ~ -!!! error TS1111: A constructor implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. public pV; private rV; public pF() { } @@ -1509,7 +1341,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all var V; function F() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. ~ !!! error TS1036: Statements are not allowed in ambient contexts. class C { } @@ -1518,9 +1350,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export var eV; export function eF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. - ~ -!!! error TS1036: Statements are not allowed in ambient contexts. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export class eC { } export interface eI { } export module eM { } @@ -1530,8 +1360,8 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export declare function eaF() { }; ~~~~~~~ !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. - ~ -!!! error TS1036: Statements are not allowed in ambient contexts. + ~ +!!! error TS1184: An implementation cannot be declared in ambient contexts. export declare class eaC { } ~~~~~~~ !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. @@ -1542,13 +1372,11 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export var eV; export function eF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. - ~ -!!! error TS1036: Statements are not allowed in ambient contexts. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export class eC { constructor () { } ~ -!!! error TS1111: A constructor implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. public pV; private rV; public pF() { } @@ -1611,7 +1439,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all var V; function F() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. ~ !!! error TS1036: Statements are not allowed in ambient contexts. class C { } @@ -1619,9 +1447,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all export var eV; export function eF() { }; ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. - ~ -!!! error TS1036: Statements are not allowed in ambient contexts. +!!! error TS1184: An implementation cannot be declared in ambient contexts. export class eC { } export interface eI { } export module eM { } diff --git a/tests/baselines/reference/initializersInDeclarations.errors.txt b/tests/baselines/reference/initializersInDeclarations.errors.txt index ad92cc79281..5ab9ae5d2bc 100644 --- a/tests/baselines/reference/initializersInDeclarations.errors.txt +++ b/tests/baselines/reference/initializersInDeclarations.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/externalModules/initializersInDeclarations.ts(5,9): error TS1039: Initializers are not allowed in ambient contexts. tests/cases/conformance/externalModules/initializersInDeclarations.ts(6,16): error TS1039: Initializers are not allowed in ambient contexts. tests/cases/conformance/externalModules/initializersInDeclarations.ts(7,16): error TS1037: A function implementation cannot be declared in an ambient context. -tests/cases/conformance/externalModules/initializersInDeclarations.ts(16,2): error TS1036: Statements are not allowed in ambient contexts. tests/cases/conformance/externalModules/initializersInDeclarations.ts(12,15): error TS1039: Initializers are not allowed in ambient contexts. tests/cases/conformance/externalModules/initializersInDeclarations.ts(13,15): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/externalModules/initializersInDeclarations.ts(16,2): error TS1036: Statements are not allowed in ambient contexts. tests/cases/conformance/externalModules/initializersInDeclarations.ts(18,16): error TS1039: Initializers are not allowed in ambient contexts. diff --git a/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt index 6113009e598..65fd55b763b 100644 --- a/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(4,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(8,4): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(37,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts(37,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. ==== tests/cases/conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts (6 errors) ==== diff --git a/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt index c89f9c01055..e9643394d12 100644 --- a/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(4,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(8,4): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(37,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts(37,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. ==== tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts (6 errors) ==== diff --git a/tests/baselines/reference/invalidForBreakStatements.errors.txt b/tests/baselines/reference/invalidForBreakStatements.errors.txt index c63c97dcf69..50e4013c0ea 100644 --- a/tests/baselines/reference/invalidForBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidForBreakStatements.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(4,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(8,9): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(36,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts(36,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. ==== tests/cases/conformance/statements/breakStatements/invalidForBreakStatements.ts (6 errors) ==== diff --git a/tests/baselines/reference/invalidForContinueStatements.errors.txt b/tests/baselines/reference/invalidForContinueStatements.errors.txt index 459c2c5efa7..3af47370df1 100644 --- a/tests/baselines/reference/invalidForContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidForContinueStatements.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(4,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(8,9): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(36,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts(36,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. ==== tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts (6 errors) ==== diff --git a/tests/baselines/reference/invalidForInBreakStatements.errors.txt b/tests/baselines/reference/invalidForInBreakStatements.errors.txt index c12babd3a3a..d83304ab1c6 100644 --- a/tests/baselines/reference/invalidForInBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidForInBreakStatements.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(4,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(8,19): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(37,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts(37,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. ==== tests/cases/conformance/statements/breakStatements/invalidForInBreakStatements.ts (6 errors) ==== diff --git a/tests/baselines/reference/invalidForInContinueStatements.errors.txt b/tests/baselines/reference/invalidForInContinueStatements.errors.txt index ebd96fd6e46..7353a22d9cd 100644 --- a/tests/baselines/reference/invalidForInContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidForInContinueStatements.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(4,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(8,19): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(37,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts(37,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. ==== tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts (6 errors) ==== diff --git a/tests/baselines/reference/invalidWhileBreakStatements.errors.txt b/tests/baselines/reference/invalidWhileBreakStatements.errors.txt index 1ed29772d7b..54adc2856d7 100644 --- a/tests/baselines/reference/invalidWhileBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidWhileBreakStatements.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(4,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(8,14): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(37,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(27,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts(37,5): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. ==== tests/cases/conformance/statements/breakStatements/invalidWhileBreakStatements.ts (6 errors) ==== diff --git a/tests/baselines/reference/invalidWhileContinueStatements.errors.txt b/tests/baselines/reference/invalidWhileContinueStatements.errors.txt index ac658dbc944..462b244efd4 100644 --- a/tests/baselines/reference/invalidWhileContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidWhileContinueStatements.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(4,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(8,14): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. -tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(37,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(14,9): error TS1107: Jump target cannot cross function boundary. tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(21,9): error TS1107: Jump target cannot cross function boundary. +tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(27,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. +tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts(37,5): error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. ==== tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts (6 errors) ==== diff --git a/tests/baselines/reference/letDeclarations-invalidContexts.errors.txt b/tests/baselines/reference/letDeclarations-invalidContexts.errors.txt index f8115718b80..1ece1f31433 100644 --- a/tests/baselines/reference/letDeclarations-invalidContexts.errors.txt +++ b/tests/baselines/reference/letDeclarations-invalidContexts.errors.txt @@ -3,14 +3,13 @@ tests/cases/compiler/letDeclarations-invalidContexts.ts(6,5): error TS1157: 'let tests/cases/compiler/letDeclarations-invalidContexts.ts(9,5): error TS1157: 'let' declarations can only be declared inside a block. tests/cases/compiler/letDeclarations-invalidContexts.ts(12,5): error TS1157: 'let' declarations can only be declared inside a block. tests/cases/compiler/letDeclarations-invalidContexts.ts(16,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. -tests/cases/compiler/letDeclarations-invalidContexts.ts(17,5): error TS1157: 'let' declarations can only be declared inside a block. tests/cases/compiler/letDeclarations-invalidContexts.ts(20,5): error TS1157: 'let' declarations can only be declared inside a block. tests/cases/compiler/letDeclarations-invalidContexts.ts(23,5): error TS1157: 'let' declarations can only be declared inside a block. tests/cases/compiler/letDeclarations-invalidContexts.ts(26,12): error TS1157: 'let' declarations can only be declared inside a block. tests/cases/compiler/letDeclarations-invalidContexts.ts(29,29): error TS1157: 'let' declarations can only be declared inside a block. -==== tests/cases/compiler/letDeclarations-invalidContexts.ts (10 errors) ==== +==== tests/cases/compiler/letDeclarations-invalidContexts.ts (9 errors) ==== // Errors, let must be defined inside a block if (true) @@ -38,8 +37,6 @@ tests/cases/compiler/letDeclarations-invalidContexts.ts(29,29): error TS1157: 'l ~~~ !!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. let l5 = 0; - ~~~~~~~~~~~ -!!! error TS1157: 'let' declarations can only be declared inside a block. for (var i = 0; i < 10; i++) let l6 = 0; diff --git a/tests/baselines/reference/missingRequiredDeclare.d.errors.txt b/tests/baselines/reference/missingRequiredDeclare.d.errors.txt index 1e52fa92fe5..dc713c86d89 100644 --- a/tests/baselines/reference/missingRequiredDeclare.d.errors.txt +++ b/tests/baselines/reference/missingRequiredDeclare.d.errors.txt @@ -1,7 +1,10 @@ tests/cases/compiler/missingRequiredDeclare.d.ts(1,1): error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. +tests/cases/compiler/missingRequiredDeclare.d.ts(1,7): error TS1039: Initializers are not allowed in ambient contexts. -==== tests/cases/compiler/missingRequiredDeclare.d.ts (1 errors) ==== +==== tests/cases/compiler/missingRequiredDeclare.d.ts (2 errors) ==== var x = 1; ~~~ -!!! error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. \ No newline at end of file +!!! error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. \ No newline at end of file diff --git a/tests/baselines/reference/newOperator.errors.txt b/tests/baselines/reference/newOperator.errors.txt index 50a25a16a2c..7998217f2e5 100644 --- a/tests/baselines/reference/newOperator.errors.txt +++ b/tests/baselines/reference/newOperator.errors.txt @@ -9,9 +9,10 @@ tests/cases/compiler/newOperator.ts(22,1): error TS1150: 'new T[]' cannot be use tests/cases/compiler/newOperator.ts(28,13): error TS2304: Cannot find name 'q'. tests/cases/compiler/newOperator.ts(31,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/newOperator.ts(44,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/newOperator.ts(45,23): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -==== tests/cases/compiler/newOperator.ts (11 errors) ==== +==== tests/cases/compiler/newOperator.ts (12 errors) ==== interface ifc { } // Attempting to 'new' an interface yields poor error var i = new ifc(); @@ -80,6 +81,8 @@ tests/cases/compiler/newOperator.ts(44,16): error TS1056: Accessors are only ava ~~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return new M.T[]; + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. } } \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt b/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt index abc93a9cacc..4e04b856d8c 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt @@ -22,12 +22,12 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetter tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(37,59): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(38,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(38,60): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(43,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(42,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(43,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(50,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(55,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(64,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(60,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(64,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(67,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(68,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(76,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. diff --git a/tests/baselines/reference/parser618973.errors.txt b/tests/baselines/reference/parser618973.errors.txt index 3aa4abcfd70..83cbfb3eb67 100644 --- a/tests/baselines/reference/parser618973.errors.txt +++ b/tests/baselines/reference/parser618973.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21): error TS1148: Cannot compile external modules unless the '--module' flag is provided. tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,8): error TS1030: 'export' modifier already seen. +tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21): error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts (2 errors) ==== export export class Foo { - ~~~ -!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~ !!! error TS1030: 'export' modifier already seen. + ~~~ +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. public Bar() { } } \ No newline at end of file diff --git a/tests/baselines/reference/parserBreakStatement1.d.errors.txt b/tests/baselines/reference/parserBreakStatement1.d.errors.txt index a930d5a0124..b6f92ee8388 100644 --- a/tests/baselines/reference/parserBreakStatement1.d.errors.txt +++ b/tests/baselines/reference/parserBreakStatement1.d.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript5/Statements/parserBreakStatement1.d.ts(1,1): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/conformance/parser/ecmascript5/Statements/parserBreakStatement1.d.ts(1,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserBreakStatement1.d.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserBreakStatement1.d.ts (2 errors) ==== break; ~~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. \ No newline at end of file +!!! error TS1036: Statements are not allowed in ambient contexts. + ~~~~~~ +!!! error TS1105: 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/parserClassDeclaration18.errors.txt b/tests/baselines/reference/parserClassDeclaration18.errors.txt index 990b69a1013..ce4b01d5253 100644 --- a/tests/baselines/reference/parserClassDeclaration18.errors.txt +++ b/tests/baselines/reference/parserClassDeclaration18.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration18.ts(4,25): error TS1111: A constructor implementation cannot be declared in an ambient context. +tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration18.ts(4,25): error TS1184: An implementation cannot be declared in ambient contexts. ==== tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration18.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclarat constructor(n: number); constructor(x: any) { ~ -!!! error TS1111: A constructor implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. } bar1():void; } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName11.errors.txt b/tests/baselines/reference/parserComputedPropertyName11.errors.txt index f47aa75031d..728d10e59d3 100644 --- a/tests/baselines/reference/parserComputedPropertyName11.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName11.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS1168: Computed property names are not allowed in method overloads. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts (2 errors) ==== class C { [e](); ~~~ !!! error TS1168: Computed property names are not allowed in method overloads. + ~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName14.errors.txt b/tests/baselines/reference/parserComputedPropertyName14.errors.txt index d2f7ad34ed9..e935314b4f1 100644 --- a/tests/baselines/reference/parserComputedPropertyName14.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName14.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts(1,10): error TS1170: Computed property names are not allowed in type literals. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts(1,10): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts (2 errors) ==== var v: { [e](): number }; ~~~ -!!! error TS1170: Computed property names are not allowed in type literals. \ No newline at end of file +!!! error TS1170: Computed property names are not allowed in type literals. + ~~~ +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName18.errors.txt b/tests/baselines/reference/parserComputedPropertyName18.errors.txt index 72833dda837..8539a568389 100644 --- a/tests/baselines/reference/parserComputedPropertyName18.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName18.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts(1,10): error TS1170: Computed property names are not allowed in type literals. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts(1,10): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts (2 errors) ==== var v: { [e]?(): number }; ~~~ -!!! error TS1170: Computed property names are not allowed in type literals. \ No newline at end of file +!!! error TS1170: Computed property names are not allowed in type literals. + ~~~ +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName20.errors.txt b/tests/baselines/reference/parserComputedPropertyName20.errors.txt index 36a7e2d4866..e743e7f94b5 100644 --- a/tests/baselines/reference/parserComputedPropertyName20.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName20.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts(2,5): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts(2,5): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts (2 errors) ==== interface I { [e](): number ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName23.errors.txt b/tests/baselines/reference/parserComputedPropertyName23.errors.txt index 2018032ef94..317f198e4d4 100644 --- a/tests/baselines/reference/parserComputedPropertyName23.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName23.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts(2,9): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts(2,9): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts (2 errors) ==== declare class C { get [e](): number ~~~ !!! error TS1086: An accessor cannot be declared in an ambient context. + ~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName32.errors.txt b/tests/baselines/reference/parserComputedPropertyName32.errors.txt index 4407014cf99..7aba423d690 100644 --- a/tests/baselines/reference/parserComputedPropertyName32.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName32.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts(2,5): error TS1165: Computed property names are not allowed in an ambient context. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts(2,5): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts (2 errors) ==== declare class C { [e](): number ~~~ !!! error TS1165: Computed property names are not allowed in an ambient context. + ~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/parserConstructorDeclaration11.errors.txt b/tests/baselines/reference/parserConstructorDeclaration11.errors.txt index 7e5c305fb80..e8a799fc36a 100644 --- a/tests/baselines/reference/parserConstructorDeclaration11.errors.txt +++ b/tests/baselines/reference/parserConstructorDeclaration11.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration11.ts(2,14): error TS1098: Type parameter list cannot be empty. +tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration11.ts(2,15): error TS1092: Type parameters cannot appear on a constructor declaration. -==== tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration11.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration11.ts (2 errors) ==== class C { constructor<>() { } ~~ !!! error TS1098: Type parameter list cannot be empty. + +!!! error TS1092: Type parameters cannot appear on a constructor declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/parserConstructorDeclaration12.errors.txt b/tests/baselines/reference/parserConstructorDeclaration12.errors.txt index 181a3b2215f..8f0a872a0af 100644 --- a/tests/baselines/reference/parserConstructorDeclaration12.errors.txt +++ b/tests/baselines/reference/parserConstructorDeclaration12.errors.txt @@ -1,61 +1,85 @@ tests/cases/compiler/parserConstructorDeclaration12.ts(2,3): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/parserConstructorDeclaration12.ts(2,14): error TS1098: Type parameter list cannot be empty. +tests/cases/compiler/parserConstructorDeclaration12.ts(2,15): error TS1092: Type parameters cannot appear on a constructor declaration. tests/cases/compiler/parserConstructorDeclaration12.ts(3,3): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/parserConstructorDeclaration12.ts(3,14): error TS1098: Type parameter list cannot be empty. +tests/cases/compiler/parserConstructorDeclaration12.ts(3,15): error TS1092: Type parameters cannot appear on a constructor declaration. tests/cases/compiler/parserConstructorDeclaration12.ts(4,3): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/parserConstructorDeclaration12.ts(4,15): error TS1098: Type parameter list cannot be empty. +tests/cases/compiler/parserConstructorDeclaration12.ts(4,16): error TS1092: Type parameters cannot appear on a constructor declaration. tests/cases/compiler/parserConstructorDeclaration12.ts(5,3): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/parserConstructorDeclaration12.ts(5,15): error TS1098: Type parameter list cannot be empty. +tests/cases/compiler/parserConstructorDeclaration12.ts(5,16): error TS1092: Type parameters cannot appear on a constructor declaration. tests/cases/compiler/parserConstructorDeclaration12.ts(6,3): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/parserConstructorDeclaration12.ts(6,14): error TS1098: Type parameter list cannot be empty. +tests/cases/compiler/parserConstructorDeclaration12.ts(6,15): error TS1092: Type parameters cannot appear on a constructor declaration. tests/cases/compiler/parserConstructorDeclaration12.ts(7,3): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/parserConstructorDeclaration12.ts(7,14): error TS1098: Type parameter list cannot be empty. +tests/cases/compiler/parserConstructorDeclaration12.ts(7,15): error TS1092: Type parameters cannot appear on a constructor declaration. tests/cases/compiler/parserConstructorDeclaration12.ts(8,3): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/parserConstructorDeclaration12.ts(8,15): error TS1098: Type parameter list cannot be empty. +tests/cases/compiler/parserConstructorDeclaration12.ts(8,16): error TS1092: Type parameters cannot appear on a constructor declaration. tests/cases/compiler/parserConstructorDeclaration12.ts(9,3): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/parserConstructorDeclaration12.ts(9,15): error TS1098: Type parameter list cannot be empty. +tests/cases/compiler/parserConstructorDeclaration12.ts(9,16): error TS1092: Type parameters cannot appear on a constructor declaration. -==== tests/cases/compiler/parserConstructorDeclaration12.ts (16 errors) ==== +==== tests/cases/compiler/parserConstructorDeclaration12.ts (24 errors) ==== class C { constructor<>() { } ~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. ~~ !!! error TS1098: Type parameter list cannot be empty. + +!!! error TS1092: Type parameters cannot appear on a constructor declaration. constructor<> () { } ~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. ~~ !!! error TS1098: Type parameter list cannot be empty. + +!!! error TS1092: Type parameters cannot appear on a constructor declaration. constructor <>() { } ~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. ~~ !!! error TS1098: Type parameter list cannot be empty. + +!!! error TS1092: Type parameters cannot appear on a constructor declaration. constructor <> () { } ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. ~~ !!! error TS1098: Type parameter list cannot be empty. + +!!! error TS1092: Type parameters cannot appear on a constructor declaration. constructor< >() { } ~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. ~~~ !!! error TS1098: Type parameter list cannot be empty. + +!!! error TS1092: Type parameters cannot appear on a constructor declaration. constructor< > () { } ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. ~~~ !!! error TS1098: Type parameter list cannot be empty. + +!!! error TS1092: Type parameters cannot appear on a constructor declaration. constructor < >() { } ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. ~~~ !!! error TS1098: Type parameter list cannot be empty. + +!!! error TS1092: Type parameters cannot appear on a constructor declaration. constructor < > () { } ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2392: Multiple constructor implementations are not allowed. ~~~ !!! error TS1098: Type parameter list cannot be empty. + +!!! error TS1092: Type parameters cannot appear on a constructor declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/parserConstructorDeclaration4.errors.txt b/tests/baselines/reference/parserConstructorDeclaration4.errors.txt index bd27ccbb255..e851885f0ee 100644 --- a/tests/baselines/reference/parserConstructorDeclaration4.errors.txt +++ b/tests/baselines/reference/parserConstructorDeclaration4.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration4.ts(2,3): error TS1031: 'declare' modifier cannot appear on a class element. +tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration4.ts(2,25): error TS1184: An implementation cannot be declared in ambient contexts. -==== tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration4.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration4.ts (2 errors) ==== class C { declare constructor() { } ~~~~~~~ !!! error TS1031: 'declare' modifier cannot appear on a class element. + ~ +!!! error TS1184: An implementation cannot be declared in ambient contexts. } \ No newline at end of file diff --git a/tests/baselines/reference/parserContinueStatement1.d.errors.txt b/tests/baselines/reference/parserContinueStatement1.d.errors.txt index a143922a761..f16e32987a2 100644 --- a/tests/baselines/reference/parserContinueStatement1.d.errors.txt +++ b/tests/baselines/reference/parserContinueStatement1.d.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript5/Statements/parserContinueStatement1.d.ts(1,1): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/conformance/parser/ecmascript5/Statements/parserContinueStatement1.d.ts(1,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserContinueStatement1.d.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserContinueStatement1.d.ts (2 errors) ==== continue; ~~~~~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. \ No newline at end of file +!!! error TS1036: Statements are not allowed in ambient contexts. + ~~~~~~~~~ +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName11.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName11.errors.txt index 124db7da75a..1e4a532d132 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName11.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName11.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,4): error TS1168: Computed property names are not allowed in method overloads. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,4): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts (2 errors) ==== class C { [e](); ~~~ !!! error TS1168: Computed property names are not allowed in method overloads. + ~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/parserFunctionDeclaration2.d.errors.txt b/tests/baselines/reference/parserFunctionDeclaration2.d.errors.txt index f623642e827..9aee5f2b0e7 100644 --- a/tests/baselines/reference/parserFunctionDeclaration2.d.errors.txt +++ b/tests/baselines/reference/parserFunctionDeclaration2.d.errors.txt @@ -1,8 +1,11 @@ tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration2.d.ts(1,1): error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. +tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration2.d.ts(1,14): error TS1184: An implementation cannot be declared in ambient contexts. -==== tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration2.d.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration2.d.ts (2 errors) ==== function F() { ~~~~~~~~ !!! error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. + ~ +!!! error TS1184: An implementation cannot be declared in ambient contexts. } \ No newline at end of file diff --git a/tests/baselines/reference/parserFunctionDeclaration2.errors.txt b/tests/baselines/reference/parserFunctionDeclaration2.errors.txt index 0b09c7c6956..deb96553220 100644 --- a/tests/baselines/reference/parserFunctionDeclaration2.errors.txt +++ b/tests/baselines/reference/parserFunctionDeclaration2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration2.ts(1,24): error TS1037: A function implementation cannot be declared in an ambient context. +tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration2.ts(1,24): error TS1184: An implementation cannot be declared in ambient contexts. ==== tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration2.ts (1 errors) ==== declare function Foo() { ~ -!!! error TS1037: A function implementation cannot be declared in an ambient context. +!!! error TS1184: An implementation cannot be declared in ambient contexts. } \ No newline at end of file diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration5.errors.txt b/tests/baselines/reference/parserMemberFunctionDeclaration5.errors.txt index dc19cb0f855..12fb40ad232 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration5.errors.txt +++ b/tests/baselines/reference/parserMemberFunctionDeclaration5.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration5.ts(2,5): error TS1031: 'declare' modifier cannot appear on a class element. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration5.ts(2,19): error TS1184: An implementation cannot be declared in ambient contexts. -==== tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration5.ts (2 errors) ==== class C { declare Foo() { } ~~~~~~~ !!! error TS1031: 'declare' modifier cannot appear on a class element. + ~ +!!! error TS1184: An implementation cannot be declared in ambient contexts. } \ No newline at end of file diff --git a/tests/baselines/reference/parserModuleDeclaration4.d.errors.txt b/tests/baselines/reference/parserModuleDeclaration4.d.errors.txt index 3f7cc9c53d3..2e75c6cbc50 100644 --- a/tests/baselines/reference/parserModuleDeclaration4.d.errors.txt +++ b/tests/baselines/reference/parserModuleDeclaration4.d.errors.txt @@ -1,10 +1,13 @@ tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.d.ts(1,1): error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. +tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.d.ts(2,3): error TS1038: A 'declare' modifier cannot be used in an already ambient context. -==== tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.d.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.d.ts (2 errors) ==== module M { ~~~~~~ !!! error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. declare module M1 { + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. } } \ No newline at end of file diff --git a/tests/baselines/reference/parserReturnStatement1.d.errors.txt b/tests/baselines/reference/parserReturnStatement1.d.errors.txt index 844be85439e..097a19a2bfe 100644 --- a/tests/baselines/reference/parserReturnStatement1.d.errors.txt +++ b/tests/baselines/reference/parserReturnStatement1.d.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript5/Statements/parserReturnStatement1.d.ts(1,1): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/conformance/parser/ecmascript5/Statements/parserReturnStatement1.d.ts(1,1): error TS1108: A 'return' statement can only be used within a function body. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserReturnStatement1.d.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserReturnStatement1.d.ts (2 errors) ==== return; ~~~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. \ No newline at end of file +!!! error TS1036: Statements are not allowed in ambient contexts. + ~~~~~~ +!!! error TS1108: A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/tests/baselines/reference/parserVariableStatement1.d.errors.txt b/tests/baselines/reference/parserVariableStatement1.d.errors.txt index 7176e5ed69f..de0bef5288c 100644 --- a/tests/baselines/reference/parserVariableStatement1.d.errors.txt +++ b/tests/baselines/reference/parserVariableStatement1.d.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript5/Statements/parserVariableStatement1.d.ts(1,1): error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. +tests/cases/conformance/parser/ecmascript5/Statements/parserVariableStatement1.d.ts(1,7): error TS1039: Initializers are not allowed in ambient contexts. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserVariableStatement1.d.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserVariableStatement1.d.ts (2 errors) ==== var v = 1; ~~~ -!!! error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. \ No newline at end of file +!!! error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. \ No newline at end of file diff --git a/tests/baselines/reference/parserWithStatement2.errors.txt b/tests/baselines/reference/parserWithStatement2.errors.txt index c2d4b2efa96..bab548de06e 100644 --- a/tests/baselines/reference/parserWithStatement2.errors.txt +++ b/tests/baselines/reference/parserWithStatement2.errors.txt @@ -1,11 +1,8 @@ tests/cases/conformance/parser/ecmascript5/Statements/parserWithStatement2.ts(1,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. -tests/cases/conformance/parser/ecmascript5/Statements/parserWithStatement2.ts(2,3): error TS1108: A 'return' statement can only be used within a function body. -==== tests/cases/conformance/parser/ecmascript5/Statements/parserWithStatement2.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/Statements/parserWithStatement2.ts (1 errors) ==== with (1) ~ !!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. - return; - ~~~~~~ -!!! error TS1108: A 'return' statement can only be used within a function body. \ No newline at end of file + return; \ No newline at end of file diff --git a/tests/baselines/reference/parserWithStatement2.js b/tests/baselines/reference/parserWithStatement2.js new file mode 100644 index 00000000000..be3ed9c6c24 --- /dev/null +++ b/tests/baselines/reference/parserWithStatement2.js @@ -0,0 +1,7 @@ +//// [parserWithStatement2.ts] +with (1) + return; + +//// [parserWithStatement2.js] +with (1) + return; diff --git a/tests/baselines/reference/semicolonsInModuleDeclarations.errors.txt b/tests/baselines/reference/semicolonsInModuleDeclarations.errors.txt index 920d5007509..64b95f124a6 100644 --- a/tests/baselines/reference/semicolonsInModuleDeclarations.errors.txt +++ b/tests/baselines/reference/semicolonsInModuleDeclarations.errors.txt @@ -1,10 +1,13 @@ tests/cases/compiler/semicolonsInModuleDeclarations.ts(2,27): error TS1036: Statements are not allowed in ambient contexts. +tests/cases/compiler/semicolonsInModuleDeclarations.ts(2,27): error TS1036: Statements are not allowed in ambient contexts. -==== tests/cases/compiler/semicolonsInModuleDeclarations.ts (1 errors) ==== +==== tests/cases/compiler/semicolonsInModuleDeclarations.ts (2 errors) ==== declare module ambiModule { export interface i1 { }; ~ +!!! error TS1036: Statements are not allowed in ambient contexts. + ~ !!! error TS1036: Statements are not allowed in ambient contexts. export interface i2 { } } diff --git a/tests/baselines/reference/switchStatementsWithMultipleDefaults.errors.txt b/tests/baselines/reference/switchStatementsWithMultipleDefaults.errors.txt index 10568608a79..c911886c670 100644 --- a/tests/baselines/reference/switchStatementsWithMultipleDefaults.errors.txt +++ b/tests/baselines/reference/switchStatementsWithMultipleDefaults.errors.txt @@ -1,8 +1,9 @@ tests/cases/compiler/switchStatementsWithMultipleDefaults.ts(9,5): error TS1113: A 'default' clause cannot appear more than once in a 'switch' statement. tests/cases/compiler/switchStatementsWithMultipleDefaults.ts(21,13): error TS1113: A 'default' clause cannot appear more than once in a 'switch' statement. +tests/cases/compiler/switchStatementsWithMultipleDefaults.ts(28,22): error TS1108: A 'return' statement can only be used within a function body. -==== tests/cases/compiler/switchStatementsWithMultipleDefaults.ts (2 errors) ==== +==== tests/cases/compiler/switchStatementsWithMultipleDefaults.ts (3 errors) ==== var x = 10; @@ -35,6 +36,8 @@ tests/cases/compiler/switchStatementsWithMultipleDefaults.ts(21,13): error TS111 def\u0061ult: // Error, fourth 'default' clause. // Errors on fifth-seventh default: return; + ~~~~~~ +!!! error TS1108: A 'return' statement can only be used within a function body. default: default: } } \ No newline at end of file diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt index a9b9e45a33c..6b389218f65 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt @@ -7,15 +7,18 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(20,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(22,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(22,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(24,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(24,19): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(24,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(26,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(26,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(26,40): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(28,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(28,50): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(28,57): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts (15 errors) ==== +==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts (18 errors) ==== interface I { (stringParts: string[], ...rest: boolean[]): I; g: I; @@ -58,18 +61,24 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. f `abc`[0].member `abc${1}def${2}ghi`; + ~~~~~ +!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. ~~~~~~ !!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. ~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; + ~~~~~~ +!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. ~ !!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. ~~~~~~ !!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`; + ~~~~~~ +!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. ~~~~~~ !!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. ~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.errors.txt index 4ea0304f421..2557d6cc94a 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.errors.txt @@ -6,11 +6,13 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts(13,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts(15,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts(17,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts(19,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts(19,32): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts(21,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts(21,46): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. -==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts (10 errors) ==== +==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts (12 errors) ==== var f: any; f `abc` @@ -46,10 +48,14 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts !!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. f `abc`["member"].someOtherTag `abc${1}def${2}ghi`; + ~~~~~ +!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. ~~~~~~ !!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. f `abc${1}def${2}ghi`["member"].someOtherTag `abc${1}def${2}ghi`; + ~~~~~~ +!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. ~~~~~~ !!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.errors.txt index 173d3a6b741..28050ec96c1 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.errors.txt @@ -4,11 +4,13 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts(16,3 tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts(18,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts(20,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts(22,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts(24,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts(24,19): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts(26,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts(26,40): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. -==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts (8 errors) ==== +==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts (10 errors) ==== interface I { (stringParts: string[], ...rest: number[]): I; g: I; @@ -45,10 +47,14 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTags.ts(26,4 !!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. f `abc`[0].member `abc${1}def${2}ghi`; + ~~~~~ +!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. ~~~~~~ !!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`; + ~~~~~~ +!!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. ~~~~~~ !!! error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher. diff --git a/tests/baselines/reference/templateStringInYieldKeyword.errors.txt b/tests/baselines/reference/templateStringInYieldKeyword.errors.txt index 24d64d8f29e..7b28cf64ae9 100644 --- a/tests/baselines/reference/templateStringInYieldKeyword.errors.txt +++ b/tests/baselines/reference/templateStringInYieldKeyword.errors.txt @@ -1,11 +1,14 @@ tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(3,13): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts (1 errors) ==== +==== tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts (2 errors) ==== function* gen() { ~ !!! error TS9001: Generators are not currently supported. // Once this is supported, the inner expression does not need to be parenthesized. var x = yield `abc${ x }def`; + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt index 20542cb12b7..46ca3c74b95 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt +++ b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt @@ -1,11 +1,14 @@ tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(3,20): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts (1 errors) ==== +==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts (2 errors) ==== function* gen() { ~ !!! error TS9001: Generators are not currently supported. // Once this is supported, yield *must* be parenthesized. var x = `abc${ yield 10 }def`; + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/yieldExpression1.errors.txt b/tests/baselines/reference/yieldExpression1.errors.txt index 33d9c1bf62e..91a379e6172 100644 --- a/tests/baselines/reference/yieldExpression1.errors.txt +++ b/tests/baselines/reference/yieldExpression1.errors.txt @@ -1,9 +1,12 @@ tests/cases/compiler/yieldExpression1.ts(1,9): error TS9001: Generators are not currently supported. +tests/cases/compiler/yieldExpression1.ts(2,5): error TS9000: 'yield' expressions are not currently supported. -==== tests/cases/compiler/yieldExpression1.ts (1 errors) ==== +==== tests/cases/compiler/yieldExpression1.ts (2 errors) ==== function* foo() { ~ !!! error TS9001: Generators are not currently supported. yield + ~~~~~ +!!! error TS9000: 'yield' expressions are not currently supported. } \ No newline at end of file