From bcef31c841297fcf44fa13ef43d4bfe352c113a6 Mon Sep 17 00:00:00 2001 From: Jesse Trinity Date: Wed, 19 May 2021 14:09:42 -0700 Subject: [PATCH] Revert "Only issue matching token errors on non-dupe locations (#43460)" This reverts commit 76a2ae3d69e7eba33890d65159ee66719c69b916. --- src/compiler/parser.ts | 53 +++++++++++-------- ...torWithIncompleteTypeAnnotation.errors.txt | 1 + ...tructuringParameterDeclaration2.errors.txt | 1 + ...thDotFollowedByNamespaceKeyword.errors.txt | 3 +- .../nestedClassDeclaration.errors.txt | 1 + .../objectLiteralWithSemicolons4.errors.txt | 3 +- .../objectSpreadNegativeParse.errors.txt | 1 + .../parseErrorIncorrectReturnToken.errors.txt | 1 + ...RecoveryArrayLiteralExpression3.errors.txt | 1 + .../reference/parserFuzz1.errors.txt | 3 +- .../reference/reservedWords2.errors.txt | 1 + .../syntax-errors-with-incremental.js | 10 ++++ .../initial-build/syntax-errors.js | 10 ++++ ...mit-any-files-on-error-with-incremental.js | 10 ++++ .../does-not-emit-any-files-on-error.js | 10 ++++ .../with-noEmitOnError-syntax-errors.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../default/with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../defaultAndD/with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../incremental/default/with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../defaultAndD/with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../isolatedModules/with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../isolatedModulesAndD/with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../isolatedModules/with-noEmitOnError.js | 10 ++++ .../with-noEmitOnError-with-incremental.js | 10 ++++ .../isolatedModulesAndD/with-noEmitOnError.js | 10 ++++ 40 files changed, 334 insertions(+), 25 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6c0ee33b57e76..51a6ac64a1d92 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1336,27 +1336,24 @@ namespace ts { return inContext(NodeFlags.AwaitContext); } - function parseErrorAtCurrentToken(message: DiagnosticMessage, arg0?: any): DiagnosticWithDetachedLocation | undefined { - return parseErrorAt(scanner.getTokenPos(), scanner.getTextPos(), message, arg0); + function parseErrorAtCurrentToken(message: DiagnosticMessage, arg0?: any): void { + parseErrorAt(scanner.getTokenPos(), scanner.getTextPos(), message, arg0); } - function parseErrorAtPosition(start: number, length: number, message: DiagnosticMessage, arg0?: any): DiagnosticWithDetachedLocation | undefined { + function parseErrorAtPosition(start: number, length: number, message: DiagnosticMessage, arg0?: any): void { // Don't report another error if it would just be at the same position as the last error. const lastError = lastOrUndefined(parseDiagnostics); - let result: DiagnosticWithDetachedLocation | undefined; if (!lastError || start !== lastError.start) { - result = createDetachedDiagnostic(fileName, start, length, message, arg0); - parseDiagnostics.push(result); + parseDiagnostics.push(createDetachedDiagnostic(fileName, start, length, message, arg0)); } // Mark that we've encountered an error. We'll set an appropriate bit on the next // node we finish so that it can't be reused incrementally. parseErrorBeforeNextFinishedNode = true; - return result; } - function parseErrorAt(start: number, end: number, message: DiagnosticMessage, arg0?: any): DiagnosticWithDetachedLocation | undefined { - return parseErrorAtPosition(start, end - start, message, arg0); + function parseErrorAt(start: number, end: number, message: DiagnosticMessage, arg0?: any): void { + parseErrorAtPosition(start, end - start, message, arg0); } function parseErrorAtRange(range: TextRange, message: DiagnosticMessage, arg0?: any): void { @@ -1547,17 +1544,17 @@ namespace ts { } function parseExpectedMatchingBrackets(openKind: SyntaxKind, closeKind: SyntaxKind, openPosition: number) { - if (token() === closeKind) { - nextToken(); - return; - } - const lastError = parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(closeKind)); - if (lastError) { - addRelatedInfo( - lastError, - createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) - ); + if (!parseExpected(closeKind)) { + const lastError = lastOrUndefined(parseDiagnostics); + if (lastError && lastError.code === Diagnostics._0_expected.code) { + addRelatedInfo( + lastError, + createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) + ); + } + return false; } + return true; } function parseOptional(t: SyntaxKind): boolean { @@ -5523,7 +5520,15 @@ namespace ts { parseExpected(SyntaxKind.OpenBraceToken); const multiLine = scanner.hasPrecedingLineBreak(); const properties = parseDelimitedList(ParsingContext.ObjectLiteralMembers, parseObjectLiteralElement, /*considerSemicolonAsDelimiter*/ true); - parseExpectedMatchingBrackets(SyntaxKind.OpenBraceToken, SyntaxKind.CloseBraceToken, openBracePosition); + if (!parseExpected(SyntaxKind.CloseBraceToken)) { + const lastError = lastOrUndefined(parseDiagnostics); + if (lastError && lastError.code === Diagnostics._0_expected.code) { + addRelatedInfo( + lastError, + createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(SyntaxKind.OpenBraceToken), tokenToString(SyntaxKind.CloseBraceToken)) + ); + } + } return finishNode(factory.createObjectLiteralExpression(properties, multiLine), pos); } @@ -8010,9 +8015,13 @@ namespace ts { hasChildren = true; if (child.kind === SyntaxKind.JSDocTypeTag) { if (childTypeTag) { - const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); + parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); + const lastError = lastOrUndefined(parseDiagnostics); if (lastError) { - addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here)); + addRelatedInfo( + lastError, + createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here) + ); } break; } diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt index 2e95e0d27dfdc..372302f9435b5 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt @@ -505,6 +505,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS !!! error TS1135: Argument expression expected. ~ !!! error TS1005: '(' expected. +!!! related TS1007 tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts:257:33: The parser expected to find a ')' to match the '(' token here. ~~~~~~ !!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~~~ diff --git a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt index c1c79a2300d26..02dde837f351a 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt @@ -39,6 +39,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( !!! error TS2322: Type 'string' is not assignable to type 'number'. ~ !!! error TS1005: ',' expected. +!!! related TS1007 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts:7:4: The parser expected to find a ']' to match the '[' token here. a0([1, 2, [["world"]], "string"]); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '[number, number, string[][], string]' is not assignable to parameter of type '[number, number, string[][]]'. diff --git a/tests/baselines/reference/errorRecoveryWithDotFollowedByNamespaceKeyword.errors.txt b/tests/baselines/reference/errorRecoveryWithDotFollowedByNamespaceKeyword.errors.txt index 6bac67291472c..3a7c89e2f4157 100644 --- a/tests/baselines/reference/errorRecoveryWithDotFollowedByNamespaceKeyword.errors.txt +++ b/tests/baselines/reference/errorRecoveryWithDotFollowedByNamespaceKeyword.errors.txt @@ -16,4 +16,5 @@ tests/cases/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.ts(9,2): err } !!! error TS1005: '}' expected. -!!! related TS1007 tests/cases/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.ts:3:19: The parser expected to find a '}' to match the '{' token here. \ No newline at end of file +!!! related TS1007 tests/cases/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.ts:3:19: The parser expected to find a '}' to match the '{' token here. +!!! related TS1007 tests/cases/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.ts:2:20: The parser expected to find a '}' to match the '{' token here. \ No newline at end of file diff --git a/tests/baselines/reference/nestedClassDeclaration.errors.txt b/tests/baselines/reference/nestedClassDeclaration.errors.txt index f897c38d68191..5540ee024378d 100644 --- a/tests/baselines/reference/nestedClassDeclaration.errors.txt +++ b/tests/baselines/reference/nestedClassDeclaration.errors.txt @@ -32,6 +32,7 @@ tests/cases/conformance/classes/nestedClassDeclaration.ts(17,1): error TS1128: D !!! error TS2304: Cannot find name 'C4'. ~ !!! error TS1005: ',' expected. +!!! related TS1007 tests/cases/conformance/classes/nestedClassDeclaration.ts:14:9: The parser expected to find a '}' to match the '{' token here. } } ~ diff --git a/tests/baselines/reference/objectLiteralWithSemicolons4.errors.txt b/tests/baselines/reference/objectLiteralWithSemicolons4.errors.txt index 544bddafff278..651c0b66df75c 100644 --- a/tests/baselines/reference/objectLiteralWithSemicolons4.errors.txt +++ b/tests/baselines/reference/objectLiteralWithSemicolons4.errors.txt @@ -9,4 +9,5 @@ tests/cases/compiler/objectLiteralWithSemicolons4.ts(3,1): error TS1005: ',' exp !!! error TS18004: No value exists in scope for the shorthand property 'a'. Either declare one or provide an initializer. ; ~ -!!! error TS1005: ',' expected. \ No newline at end of file +!!! error TS1005: ',' expected. +!!! related TS1007 tests/cases/compiler/objectLiteralWithSemicolons4.ts:1:9: The parser expected to find a '}' to match the '{' token here. \ No newline at end of file diff --git a/tests/baselines/reference/objectSpreadNegativeParse.errors.txt b/tests/baselines/reference/objectSpreadNegativeParse.errors.txt index b37200c4f0293..692fb7617da63 100644 --- a/tests/baselines/reference/objectSpreadNegativeParse.errors.txt +++ b/tests/baselines/reference/objectSpreadNegativeParse.errors.txt @@ -28,6 +28,7 @@ tests/cases/conformance/types/spread/objectSpreadNegativeParse.ts(4,20): error T !!! error TS2304: Cannot find name 'matchMedia'. ~ !!! error TS1005: ',' expected. +!!! related TS1007 tests/cases/conformance/types/spread/objectSpreadNegativeParse.ts:3:10: The parser expected to find a '}' to match the '{' token here. ~ !!! error TS1128: Declaration or statement expected. let o10 = { ...get x() { return 12; }}; diff --git a/tests/baselines/reference/parseErrorIncorrectReturnToken.errors.txt b/tests/baselines/reference/parseErrorIncorrectReturnToken.errors.txt index 2cf728848e45e..bc43cd5b7763b 100644 --- a/tests/baselines/reference/parseErrorIncorrectReturnToken.errors.txt +++ b/tests/baselines/reference/parseErrorIncorrectReturnToken.errors.txt @@ -25,6 +25,7 @@ tests/cases/compiler/parseErrorIncorrectReturnToken.ts(12,1): error TS1128: Decl m(n: number) => string { ~~ !!! error TS1005: '{' expected. +!!! related TS1007 tests/cases/compiler/parseErrorIncorrectReturnToken.ts:8:9: The parser expected to find a '}' to match the '{' token here. ~~~~~~ !!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~ diff --git a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.errors.txt b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.errors.txt index eb32618af4bbf..9de5aa8014cfb 100644 --- a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.errors.txt +++ b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.errors.txt @@ -8,6 +8,7 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrayLiteralExpressions var texCoords = [2, 2, 0.5000001192092895, 0.8749999 ; 403953552, 0.5000001192092895, 0.8749999403953552]; ~ !!! error TS1005: ',' expected. +!!! related TS1007 tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrayLiteralExpressions/parserErrorRecoveryArrayLiteralExpression3.ts:1:17: The parser expected to find a ']' to match the '[' token here. ~~~~~~~~~ !!! error TS2695: Left side of comma operator is unused and has no side effects. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/parserFuzz1.errors.txt b/tests/baselines/reference/parserFuzz1.errors.txt index e90dda55244e6..e11d25c48fa56 100644 --- a/tests/baselines/reference/parserFuzz1.errors.txt +++ b/tests/baselines/reference/parserFuzz1.errors.txt @@ -20,4 +20,5 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserFuzz1.ts(2,15): e ~~~~~~ !!! error TS1005: ';' expected. -!!! error TS1005: '{' expected. \ No newline at end of file +!!! error TS1005: '{' expected. +!!! related TS1007 tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserFuzz1.ts:1:9: The parser expected to find a '}' to match the '{' token here. \ No newline at end of file diff --git a/tests/baselines/reference/reservedWords2.errors.txt b/tests/baselines/reference/reservedWords2.errors.txt index 6ecb9471631bd..7c078493e8d9d 100644 --- a/tests/baselines/reference/reservedWords2.errors.txt +++ b/tests/baselines/reference/reservedWords2.errors.txt @@ -105,6 +105,7 @@ tests/cases/compiler/reservedWords2.ts(12,17): error TS1138: Parameter declarati !!! error TS1005: ';' expected. ~ !!! error TS1005: '(' expected. +!!! related TS1007 tests/cases/compiler/reservedWords2.ts:9:18: The parser expected to find a ')' to match the '(' token here. ~ !!! error TS1128: Declaration or statement expected. enum void {} diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/syntax-errors-with-incremental.js index 308daf394aea9..10d0e3770f161 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/syntax-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/syntax-errors-with-incremental.js @@ -47,6 +47,11 @@ Output:: 4 ;   ~ + src/src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + Found 1 error. @@ -76,6 +81,11 @@ Output:: 4 ;   ~ + src/src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/syntax-errors.js b/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/syntax-errors.js index e9ea12ea0d3e4..4c55b9ce60f7f 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/syntax-errors.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/initial-build/syntax-errors.js @@ -47,6 +47,11 @@ Output:: 4 ;   ~ + src/src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + Found 1 error. @@ -76,6 +81,11 @@ Output:: 4 ;   ~ + src/src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js b/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js index 1b17fdb2ee462..4b96a48f8f60c 100644 --- a/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js +++ b/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js @@ -56,6 +56,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:35 AM] Found 1 error. Watching for file changes. @@ -108,6 +113,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:42 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error.js b/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error.js index 6af8477219c81..3e563e8f60930 100644 --- a/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error.js +++ b/tests/baselines/reference/tsbuild/watchMode/noEmitOnError/does-not-emit-any-files-on-error.js @@ -56,6 +56,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:35 AM] Found 1 error. Watching for file changes. @@ -108,6 +113,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:42 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsc/incremental/initial-build/with-noEmitOnError-syntax-errors.js b/tests/baselines/reference/tsc/incremental/initial-build/with-noEmitOnError-syntax-errors.js index 6d8d5e1bd8330..ab70d95535c29 100644 --- a/tests/baselines/reference/tsc/incremental/initial-build/with-noEmitOnError-syntax-errors.js +++ b/tests/baselines/reference/tsc/incremental/initial-build/with-noEmitOnError-syntax-errors.js @@ -47,6 +47,11 @@ Output:: 4 ;   ~ + src/src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + Found 1 error. @@ -155,6 +160,11 @@ Output:: 4 ;   ~ + src/src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + Found 1 error. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js index 01d3cecd1bedd..9b6b0c05fdfbb 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -175,6 +180,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js index 16681988e8f32..17c877f6ac1a6 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:32 AM] Found 1 error. Watching for file changes. @@ -99,6 +104,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js index 60cee519a51fa..c74e95b44358d 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -176,6 +181,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js index bae815eebebfb..9c9b6f756c1bc 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:32 AM] Found 1 error. Watching for file changes. @@ -99,6 +104,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js index be4cbb2503da1..02366f1125102 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js @@ -49,6 +49,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -180,6 +185,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError.js index da78efc9fba32..fbb7a7ed57463 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError.js @@ -49,6 +49,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:32 AM] Found 1 error. Watching for file changes. @@ -105,6 +110,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js index bf7e7e13c154d..07f84519690f9 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -175,6 +180,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError.js index 3c0a5fcd89b5c..442f3d18610b8 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:32 AM] Found 1 error. Watching for file changes. @@ -99,6 +104,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js index 3347e57400a36..ec619eb4a7070 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -175,6 +180,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js index 06c2ed70520e4..c463f068880d6 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -175,6 +180,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js index 6a1ef2230ca43..21dbc506c20db 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -176,6 +181,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js index 34366e53ebaa5..35e28f24cf7e8 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -176,6 +181,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/default/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/default/with-noEmitOnError-with-incremental.js index ead341c0c24c2..354221d990443 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/default/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/default/with-noEmitOnError-with-incremental.js @@ -49,6 +49,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -180,6 +185,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/default/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/default/with-noEmitOnError.js index 63c9185d38bde..f3c5e03a4097d 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/default/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/default/with-noEmitOnError.js @@ -49,6 +49,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -180,6 +185,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError-with-incremental.js index 1b2e76b260800..5e2009b67b411 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -175,6 +180,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError.js index 9e0103cd7fdc5..0b2f2feee3f16 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/defaultAndD/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -175,6 +180,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModules/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModules/with-noEmitOnError-with-incremental.js index 878514fada7ae..b0cd5f57eb796 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModules/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModules/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -174,6 +179,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModules/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModules/with-noEmitOnError.js index bdb72e4bede96..10e6adbf42082 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModules/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModules/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -174,6 +179,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError-with-incremental.js index f07286fecfbc6..3630b1ed77c64 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -175,6 +180,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError.js index c88348bd5bc26..17038187ea58c 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/incremental/isolatedModulesAndD/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -175,6 +180,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js index 517e41b0e0111..63db0fe14a0f0 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -174,6 +179,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError.js index 48c8bcb5bd307..4093ad4830287 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:32 AM] Found 1 error. Watching for file changes. @@ -99,6 +104,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js index 75cf59365fe80..975e40a6ec0a7 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes. @@ -175,6 +180,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:44 AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError.js index 0969d50832bf8..659ad65715340 100644 --- a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError.js +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError.js @@ -43,6 +43,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:32 AM] Found 1 error. Watching for file changes. @@ -99,6 +104,11 @@ Output:: 4 ;   ~ + src/main.ts:2:11 + 2 const a = { +    ~ + The parser expected to find a '}' to match the '{' token here. + [12:00:37 AM] Found 1 error. Watching for file changes.