diff --git a/internal/diagnosticwriter/diagnosticwriter.go b/internal/diagnosticwriter/diagnosticwriter.go index cb661f9b36..1f451da0da 100644 --- a/internal/diagnosticwriter/diagnosticwriter.go +++ b/internal/diagnosticwriter/diagnosticwriter.go @@ -90,7 +90,7 @@ func writeCodeSnippet(writer io.Writer, sourceFile *ast.SourceFile, start int, l lastLineOfFile, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, len(sourceFile.Text)) hasMoreThanFiveLines := lastLine-firstLine >= 4 - gutterWidth := len(strconv.Itoa(lastLineOfFile + 1 + len(""))) + gutterWidth := len(strconv.Itoa(lastLine + 1)) if hasMoreThanFiveLines { gutterWidth = max(len(ellipsis), gutterWidth) } diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.errors.txt b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.errors.txt index dc0c422da3..27a65bedc6 100644 --- a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.errors.txt @@ -4,12 +4,12 @@    ~~~~~ deeplyNestedAssignabilityIssue.ts:2:5 - 'a' is declared here. -  2 a: number; -    ~ + 2 a: number; +    ~ deeplyNestedAssignabilityIssue.ts:9:17 - The expected type comes from property 'thing' which is declared here on type '{ thing: A; }' -  9 thing: A; -    ~~~~~ + 9 thing: A; +    ~~~~~ deeplyNestedAssignabilityIssue.ts:25:17 - error TS2741: Property 'a' is missing in type '{}' but required in type 'A'. @@ -17,8 +17,8 @@    ~~~~~~~ deeplyNestedAssignabilityIssue.ts:2:5 - 'a' is declared here. -  2 a: number; -    ~ + 2 a: number; +    ~ deeplyNestedAssignabilityIssue.ts:12:17 - The expected type comes from property 'another' which is declared here on type '{ another: A; }' 12 another: A; diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.errors.txt.diff index e4fb7303aa..162ad3dc83 100644 --- a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.errors.txt.diff @@ -5,20 +5,16 @@    ~~~~~ - deeplyNestedAssignabilityIssue.ts:2:5 -- 2 a: number; --    ~ ++ deeplyNestedAssignabilityIssue.ts:2:5 - 'a' is declared here. + 2 a: number; +    ~ - 'a' is declared here. - deeplyNestedAssignabilityIssue.ts:9:17 -- 9 thing: A; --    ~~~~~ -- The expected type comes from property 'thing' which is declared here on type '{ thing: A; }' -+ deeplyNestedAssignabilityIssue.ts:2:5 - 'a' is declared here. -+  2 a: number; -+    ~ + + deeplyNestedAssignabilityIssue.ts:9:17 - The expected type comes from property 'thing' which is declared here on type '{ thing: A; }' -+  9 thing: A; -+    ~~~~~ + 9 thing: A; +    ~~~~~ +- The expected type comes from property 'thing' which is declared here on type '{ thing: A; }' + deeplyNestedAssignabilityIssue.ts:25:17 - error TS2741: Property 'a' is missing in type '{}' but required in type 'A'. @@ -26,13 +22,11 @@    ~~~~~~~ - deeplyNestedAssignabilityIssue.ts:2:5 -- 2 a: number; --    ~ ++ deeplyNestedAssignabilityIssue.ts:2:5 - 'a' is declared here. + 2 a: number; +    ~ - 'a' is declared here. - deeplyNestedAssignabilityIssue.ts:12:17 -+ deeplyNestedAssignabilityIssue.ts:2:5 - 'a' is declared here. -+  2 a: number; -+    ~ + + deeplyNestedAssignabilityIssue.ts:12:17 - The expected type comes from property 'another' which is declared here on type '{ another: A; }' 12 another: A; diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.errors.txt index ac186e10a6..f26290ce40 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.errors.txt @@ -4,8 +4,8 @@    ~ file2.ts:1:7 - 'A' was also declared here. -  1 class A { } -    ~ + 1 class A { } +    ~ file1.ts:2:7 - error TS2300: Duplicate identifier 'B'. @@ -13,8 +13,8 @@    ~ file2.ts:2:7 - 'B' was also declared here. -  2 class B { } -    ~ + 2 class B { } +    ~ file1.ts:3:7 - error TS2300: Duplicate identifier 'C'. @@ -22,8 +22,8 @@    ~ file2.ts:3:7 - 'C' was also declared here. -  3 class C { } -    ~ + 3 class C { } +    ~ file1.ts:4:7 - error TS2300: Duplicate identifier 'D'. @@ -31,8 +31,8 @@    ~ file2.ts:4:7 - 'D' was also declared here. -  4 class D { } -    ~ + 4 class D { } +    ~ file1.ts:5:7 - error TS2300: Duplicate identifier 'E'. @@ -40,8 +40,8 @@    ~ file2.ts:5:7 - 'E' was also declared here. -  5 class E { } -    ~ + 5 class E { } +    ~ file1.ts:6:7 - error TS2300: Duplicate identifier 'F'. @@ -49,8 +49,8 @@    ~ file2.ts:6:7 - 'F' was also declared here. -  6 class F { } -    ~ + 6 class F { } +    ~ file1.ts:7:7 - error TS2300: Duplicate identifier 'G'. @@ -58,8 +58,8 @@    ~ file2.ts:7:7 - 'G' was also declared here. -  7 class G { } -    ~ + 7 class G { } +    ~ file1.ts:8:7 - error TS2300: Duplicate identifier 'H'. @@ -67,8 +67,8 @@    ~ file2.ts:8:7 - 'H' was also declared here. -  8 class H { } -    ~ + 8 class H { } +    ~ file1.ts:9:7 - error TS2300: Duplicate identifier 'I'. @@ -76,13 +76,13 @@    ~ file2.ts:9:7 - 'I' was also declared here. -  9 class I { } -    ~ + 9 class I { } +    ~ file2.ts:1:7 - error TS2300: Duplicate identifier 'A'. - 1 class A { } -   ~ +1 class A { } +   ~ file1.ts:1:7 - 'A' was also declared here. 1 class A { } @@ -90,8 +90,8 @@ file2.ts:2:7 - error TS2300: Duplicate identifier 'B'. - 2 class B { } -   ~ +2 class B { } +   ~ file1.ts:2:7 - 'B' was also declared here. 2 class B { } @@ -99,8 +99,8 @@ file2.ts:3:7 - error TS2300: Duplicate identifier 'C'. - 3 class C { } -   ~ +3 class C { } +   ~ file1.ts:3:7 - 'C' was also declared here. 3 class C { } @@ -108,8 +108,8 @@ file2.ts:4:7 - error TS2300: Duplicate identifier 'D'. - 4 class D { } -   ~ +4 class D { } +   ~ file1.ts:4:7 - 'D' was also declared here. 4 class D { } @@ -117,8 +117,8 @@ file2.ts:5:7 - error TS2300: Duplicate identifier 'E'. - 5 class E { } -   ~ +5 class E { } +   ~ file1.ts:5:7 - 'E' was also declared here. 5 class E { } @@ -126,8 +126,8 @@ file2.ts:6:7 - error TS2300: Duplicate identifier 'F'. - 6 class F { } -   ~ +6 class F { } +   ~ file1.ts:6:7 - 'F' was also declared here. 6 class F { } @@ -135,8 +135,8 @@ file2.ts:7:7 - error TS2300: Duplicate identifier 'G'. - 7 class G { } -   ~ +7 class G { } +   ~ file1.ts:7:7 - 'G' was also declared here. 7 class G { } @@ -144,8 +144,8 @@ file2.ts:8:7 - error TS2300: Duplicate identifier 'H'. - 8 class H { } -   ~ +8 class H { } +   ~ file1.ts:8:7 - 'H' was also declared here. 8 class H { } @@ -153,8 +153,8 @@ file2.ts:9:7 - error TS2300: Duplicate identifier 'I'. - 9 class I { } -   ~ +9 class I { } +   ~ file1.ts:9:7 - 'I' was also declared here. 9 class I { } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.errors.txt.diff index 685a4cd70a..98687c7c1c 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.errors.txt.diff @@ -9,25 +9,21 @@ +   ~ - file2.ts:1:1 -- 1 class A { } ++ file2.ts:1:7 - 'A' was also declared here. + 1 class A { } -   ~~~~~ - Conflicts are in this file. -file2.ts:1:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: A, B, C, D, E, F, G, H, I -+ file2.ts:1:7 - 'A' was also declared here. -+  1 class A { } -+    ~ ++    ~ --1 class A { } --  ~~~~~ +file1.ts:2:7 - error TS2300: Duplicate identifier 'B'. - -- file1.ts:1:1 ++ +2 class B { } +   ~ + + file2.ts:2:7 - 'B' was also declared here. -+  2 class B { } -+    ~ ++ 2 class B { } ++    ~ + +file1.ts:3:7 - error TS2300: Duplicate identifier 'C'. + @@ -35,8 +31,8 @@ +   ~ + + file2.ts:3:7 - 'C' was also declared here. -+  3 class C { } -+    ~ ++ 3 class C { } ++    ~ + +file1.ts:4:7 - error TS2300: Duplicate identifier 'D'. + @@ -44,8 +40,8 @@ +   ~ + + file2.ts:4:7 - 'D' was also declared here. -+  4 class D { } -+    ~ ++ 4 class D { } ++    ~ + +file1.ts:5:7 - error TS2300: Duplicate identifier 'E'. + @@ -53,8 +49,8 @@ +   ~ + + file2.ts:5:7 - 'E' was also declared here. -+  5 class E { } -+    ~ ++ 5 class E { } ++    ~ + +file1.ts:6:7 - error TS2300: Duplicate identifier 'F'. + @@ -62,8 +58,8 @@ +   ~ + + file2.ts:6:7 - 'F' was also declared here. -+  6 class F { } -+    ~ ++ 6 class F { } ++    ~ + +file1.ts:7:7 - error TS2300: Duplicate identifier 'G'. + @@ -71,8 +67,8 @@ +   ~ + + file2.ts:7:7 - 'G' was also declared here. -+  7 class G { } -+    ~ ++ 7 class G { } ++    ~ + +file1.ts:8:7 - error TS2300: Duplicate identifier 'H'. + @@ -80,8 +76,8 @@ +   ~ + + file2.ts:8:7 - 'H' was also declared here. -+  8 class H { } -+    ~ ++ 8 class H { } ++    ~ + +file1.ts:9:7 - error TS2300: Duplicate identifier 'I'. + @@ -89,14 +85,16 @@ +   ~ + + file2.ts:9:7 - 'I' was also declared here. -+  9 class I { } -+    ~ ++ 9 class I { } ++    ~ + +file2.ts:1:7 - error TS2300: Duplicate identifier 'A'. + -+ 1 class A { } -+   ~ -+ + 1 class A { } +-  ~~~~~ ++   ~ + +- file1.ts:1:1 + file1.ts:1:7 - 'A' was also declared here. 1 class A { } -   ~~~~~ @@ -106,8 +104,8 @@ +file2.ts:2:7 - error TS2300: Duplicate identifier 'B'. -==== file1.ts (1 errors) ==== -+ 2 class B { } -+   ~ ++2 class B { } ++   ~ + + file1.ts:2:7 - 'B' was also declared here. + 2 class B { } @@ -115,8 +113,8 @@ + +file2.ts:3:7 - error TS2300: Duplicate identifier 'C'. + -+ 3 class C { } -+   ~ ++3 class C { } ++   ~ + + file1.ts:3:7 - 'C' was also declared here. + 3 class C { } @@ -124,8 +122,8 @@ + +file2.ts:4:7 - error TS2300: Duplicate identifier 'D'. + -+ 4 class D { } -+   ~ ++4 class D { } ++   ~ + + file1.ts:4:7 - 'D' was also declared here. + 4 class D { } @@ -133,8 +131,8 @@ + +file2.ts:5:7 - error TS2300: Duplicate identifier 'E'. + -+ 5 class E { } -+   ~ ++5 class E { } ++   ~ + + file1.ts:5:7 - 'E' was also declared here. + 5 class E { } @@ -142,8 +140,8 @@ + +file2.ts:6:7 - error TS2300: Duplicate identifier 'F'. + -+ 6 class F { } -+   ~ ++6 class F { } ++   ~ + + file1.ts:6:7 - 'F' was also declared here. + 6 class F { } @@ -151,8 +149,8 @@ + +file2.ts:7:7 - error TS2300: Duplicate identifier 'G'. + -+ 7 class G { } -+   ~ ++7 class G { } ++   ~ + + file1.ts:7:7 - 'G' was also declared here. + 7 class G { } @@ -160,8 +158,8 @@ + +file2.ts:8:7 - error TS2300: Duplicate identifier 'H'. + -+ 8 class H { } -+   ~ ++8 class H { } ++   ~ + + file1.ts:8:7 - 'H' was also declared here. + 8 class H { } @@ -169,8 +167,8 @@ + +file2.ts:9:7 - error TS2300: Duplicate identifier 'I'. + -+ 9 class I { } -+   ~ ++9 class I { } ++   ~ + + file1.ts:9:7 - 'I' was also declared here. + 9 class I { } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans4.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans4.errors.txt index d1422261d2..3cf299fdb9 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans4.errors.txt @@ -1,146 +1,146 @@ file1.ts:2:5 - error TS2300: Duplicate identifier 'duplicate1'. - 2 duplicate1: () => string; -   ~~~~~~~~~~ +2 duplicate1: () => string; +   ~~~~~~~~~~ file2.ts:2:5 - 'duplicate1' was also declared here. -  2 duplicate1(): number; -    ~~~~~~~~~~ + 2 duplicate1(): number; +    ~~~~~~~~~~ file1.ts:3:5 - error TS2300: Duplicate identifier 'duplicate2'. - 3 duplicate2: () => string; -   ~~~~~~~~~~ +3 duplicate2: () => string; +   ~~~~~~~~~~ file2.ts:3:5 - 'duplicate2' was also declared here. -  3 duplicate2(): number; -    ~~~~~~~~~~ + 3 duplicate2(): number; +    ~~~~~~~~~~ file1.ts:4:5 - error TS2300: Duplicate identifier 'duplicate3'. - 4 duplicate3: () => string; -   ~~~~~~~~~~ +4 duplicate3: () => string; +   ~~~~~~~~~~ file2.ts:4:5 - 'duplicate3' was also declared here. -  4 duplicate3(): number; -    ~~~~~~~~~~ + 4 duplicate3(): number; +    ~~~~~~~~~~ file1.ts:5:5 - error TS2300: Duplicate identifier 'duplicate4'. - 5 duplicate4: () => string; -   ~~~~~~~~~~ +5 duplicate4: () => string; +   ~~~~~~~~~~ file2.ts:5:5 - 'duplicate4' was also declared here. -  5 duplicate4(): number; -    ~~~~~~~~~~ + 5 duplicate4(): number; +    ~~~~~~~~~~ file1.ts:6:5 - error TS2300: Duplicate identifier 'duplicate5'. - 6 duplicate5: () => string; -   ~~~~~~~~~~ +6 duplicate5: () => string; +   ~~~~~~~~~~ file2.ts:6:5 - 'duplicate5' was also declared here. -  6 duplicate5(): number; -    ~~~~~~~~~~ + 6 duplicate5(): number; +    ~~~~~~~~~~ file1.ts:7:5 - error TS2300: Duplicate identifier 'duplicate6'. - 7 duplicate6: () => string; -   ~~~~~~~~~~ +7 duplicate6: () => string; +   ~~~~~~~~~~ file2.ts:7:5 - 'duplicate6' was also declared here. -  7 duplicate6(): number; -    ~~~~~~~~~~ + 7 duplicate6(): number; +    ~~~~~~~~~~ file1.ts:8:5 - error TS2300: Duplicate identifier 'duplicate7'. - 8 duplicate7: () => string; -   ~~~~~~~~~~ +8 duplicate7: () => string; +   ~~~~~~~~~~ file2.ts:8:5 - 'duplicate7' was also declared here. -  8 duplicate7(): number; -    ~~~~~~~~~~ + 8 duplicate7(): number; +    ~~~~~~~~~~ file1.ts:9:5 - error TS2300: Duplicate identifier 'duplicate8'. - 9 duplicate8: () => string; -   ~~~~~~~~~~ +9 duplicate8: () => string; +   ~~~~~~~~~~ file2.ts:9:5 - 'duplicate8' was also declared here. -  9 duplicate8(): number; -    ~~~~~~~~~~ + 9 duplicate8(): number; +    ~~~~~~~~~~ file2.ts:2:5 - error TS2300: Duplicate identifier 'duplicate1'. - 2 duplicate1(): number; -   ~~~~~~~~~~ +2 duplicate1(): number; +   ~~~~~~~~~~ file1.ts:2:5 - 'duplicate1' was also declared here. -  2 duplicate1: () => string; -    ~~~~~~~~~~ + 2 duplicate1: () => string; +    ~~~~~~~~~~ file2.ts:3:5 - error TS2300: Duplicate identifier 'duplicate2'. - 3 duplicate2(): number; -   ~~~~~~~~~~ +3 duplicate2(): number; +   ~~~~~~~~~~ file1.ts:3:5 - 'duplicate2' was also declared here. -  3 duplicate2: () => string; -    ~~~~~~~~~~ + 3 duplicate2: () => string; +    ~~~~~~~~~~ file2.ts:4:5 - error TS2300: Duplicate identifier 'duplicate3'. - 4 duplicate3(): number; -   ~~~~~~~~~~ +4 duplicate3(): number; +   ~~~~~~~~~~ file1.ts:4:5 - 'duplicate3' was also declared here. -  4 duplicate3: () => string; -    ~~~~~~~~~~ + 4 duplicate3: () => string; +    ~~~~~~~~~~ file2.ts:5:5 - error TS2300: Duplicate identifier 'duplicate4'. - 5 duplicate4(): number; -   ~~~~~~~~~~ +5 duplicate4(): number; +   ~~~~~~~~~~ file1.ts:5:5 - 'duplicate4' was also declared here. -  5 duplicate4: () => string; -    ~~~~~~~~~~ + 5 duplicate4: () => string; +    ~~~~~~~~~~ file2.ts:6:5 - error TS2300: Duplicate identifier 'duplicate5'. - 6 duplicate5(): number; -   ~~~~~~~~~~ +6 duplicate5(): number; +   ~~~~~~~~~~ file1.ts:6:5 - 'duplicate5' was also declared here. -  6 duplicate5: () => string; -    ~~~~~~~~~~ + 6 duplicate5: () => string; +    ~~~~~~~~~~ file2.ts:7:5 - error TS2300: Duplicate identifier 'duplicate6'. - 7 duplicate6(): number; -   ~~~~~~~~~~ +7 duplicate6(): number; +   ~~~~~~~~~~ file1.ts:7:5 - 'duplicate6' was also declared here. -  7 duplicate6: () => string; -    ~~~~~~~~~~ + 7 duplicate6: () => string; +    ~~~~~~~~~~ file2.ts:8:5 - error TS2300: Duplicate identifier 'duplicate7'. - 8 duplicate7(): number; -   ~~~~~~~~~~ +8 duplicate7(): number; +   ~~~~~~~~~~ file1.ts:8:5 - 'duplicate7' was also declared here. -  8 duplicate7: () => string; -    ~~~~~~~~~~ + 8 duplicate7: () => string; +    ~~~~~~~~~~ file2.ts:9:5 - error TS2300: Duplicate identifier 'duplicate8'. - 9 duplicate8(): number; -   ~~~~~~~~~~ +9 duplicate8(): number; +   ~~~~~~~~~~ file1.ts:9:5 - 'duplicate8' was also declared here. -  9 duplicate8: () => string; -    ~~~~~~~~~~ + 9 duplicate8: () => string; +    ~~~~~~~~~~ ==== file1.ts (8 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans4.errors.txt.diff index 060efe62e9..325c692f01 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans4.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans4.errors.txt.diff @@ -6,8 +6,8 @@ -1 interface TopLevel { -  ~~~~~~~~~ -+ 2 duplicate1: () => string; -+   ~~~~~~~~~~ ++2 duplicate1: () => string; ++   ~~~~~~~~~~ - file2.ts:1:1 - 1 interface TopLevel { @@ -15,8 +15,8 @@ - Conflicts are in this file. -file2.ts:1:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: duplicate1, duplicate2, duplicate3, duplicate4, duplicate5, duplicate6, duplicate7, duplicate8 + file2.ts:2:5 - 'duplicate1' was also declared here. -+  2 duplicate1(): number; -+    ~~~~~~~~~~ ++ 2 duplicate1(): number; ++    ~~~~~~~~~~ -1 interface TopLevel { -  ~~~~~~~~~ @@ -26,139 +26,139 @@ - 1 interface TopLevel { -   ~~~~~~~~~ - Conflicts are in this file. -+ 3 duplicate2: () => string; -+   ~~~~~~~~~~ ++3 duplicate2: () => string; ++   ~~~~~~~~~~ + file2.ts:3:5 - 'duplicate2' was also declared here. -+  3 duplicate2(): number; -+    ~~~~~~~~~~ ++ 3 duplicate2(): number; ++    ~~~~~~~~~~ -==== file1.ts (1 errors) ==== +file1.ts:4:5 - error TS2300: Duplicate identifier 'duplicate3'. + -+ 4 duplicate3: () => string; -+   ~~~~~~~~~~ ++4 duplicate3: () => string; ++   ~~~~~~~~~~ + + file2.ts:4:5 - 'duplicate3' was also declared here. -+  4 duplicate3(): number; -+    ~~~~~~~~~~ ++ 4 duplicate3(): number; ++    ~~~~~~~~~~ + +file1.ts:5:5 - error TS2300: Duplicate identifier 'duplicate4'. + -+ 5 duplicate4: () => string; -+   ~~~~~~~~~~ ++5 duplicate4: () => string; ++   ~~~~~~~~~~ + + file2.ts:5:5 - 'duplicate4' was also declared here. -+  5 duplicate4(): number; -+    ~~~~~~~~~~ ++ 5 duplicate4(): number; ++    ~~~~~~~~~~ + +file1.ts:6:5 - error TS2300: Duplicate identifier 'duplicate5'. + -+ 6 duplicate5: () => string; -+   ~~~~~~~~~~ ++6 duplicate5: () => string; ++   ~~~~~~~~~~ + + file2.ts:6:5 - 'duplicate5' was also declared here. -+  6 duplicate5(): number; -+    ~~~~~~~~~~ ++ 6 duplicate5(): number; ++    ~~~~~~~~~~ + +file1.ts:7:5 - error TS2300: Duplicate identifier 'duplicate6'. + -+ 7 duplicate6: () => string; -+   ~~~~~~~~~~ ++7 duplicate6: () => string; ++   ~~~~~~~~~~ + + file2.ts:7:5 - 'duplicate6' was also declared here. -+  7 duplicate6(): number; -+    ~~~~~~~~~~ ++ 7 duplicate6(): number; ++    ~~~~~~~~~~ + +file1.ts:8:5 - error TS2300: Duplicate identifier 'duplicate7'. + -+ 8 duplicate7: () => string; -+   ~~~~~~~~~~ ++8 duplicate7: () => string; ++   ~~~~~~~~~~ + + file2.ts:8:5 - 'duplicate7' was also declared here. -+  8 duplicate7(): number; -+    ~~~~~~~~~~ ++ 8 duplicate7(): number; ++    ~~~~~~~~~~ + +file1.ts:9:5 - error TS2300: Duplicate identifier 'duplicate8'. + -+ 9 duplicate8: () => string; -+   ~~~~~~~~~~ ++9 duplicate8: () => string; ++   ~~~~~~~~~~ + + file2.ts:9:5 - 'duplicate8' was also declared here. -+  9 duplicate8(): number; -+    ~~~~~~~~~~ ++ 9 duplicate8(): number; ++    ~~~~~~~~~~ + +file2.ts:2:5 - error TS2300: Duplicate identifier 'duplicate1'. + -+ 2 duplicate1(): number; -+   ~~~~~~~~~~ ++2 duplicate1(): number; ++   ~~~~~~~~~~ + + file1.ts:2:5 - 'duplicate1' was also declared here. -+  2 duplicate1: () => string; -+    ~~~~~~~~~~ ++ 2 duplicate1: () => string; ++    ~~~~~~~~~~ + +file2.ts:3:5 - error TS2300: Duplicate identifier 'duplicate2'. + -+ 3 duplicate2(): number; -+   ~~~~~~~~~~ ++3 duplicate2(): number; ++   ~~~~~~~~~~ + + file1.ts:3:5 - 'duplicate2' was also declared here. -+  3 duplicate2: () => string; -+    ~~~~~~~~~~ ++ 3 duplicate2: () => string; ++    ~~~~~~~~~~ + +file2.ts:4:5 - error TS2300: Duplicate identifier 'duplicate3'. + -+ 4 duplicate3(): number; -+   ~~~~~~~~~~ ++4 duplicate3(): number; ++   ~~~~~~~~~~ + + file1.ts:4:5 - 'duplicate3' was also declared here. -+  4 duplicate3: () => string; -+    ~~~~~~~~~~ ++ 4 duplicate3: () => string; ++    ~~~~~~~~~~ + +file2.ts:5:5 - error TS2300: Duplicate identifier 'duplicate4'. + -+ 5 duplicate4(): number; -+   ~~~~~~~~~~ ++5 duplicate4(): number; ++   ~~~~~~~~~~ + + file1.ts:5:5 - 'duplicate4' was also declared here. -+  5 duplicate4: () => string; -+    ~~~~~~~~~~ ++ 5 duplicate4: () => string; ++    ~~~~~~~~~~ + +file2.ts:6:5 - error TS2300: Duplicate identifier 'duplicate5'. + -+ 6 duplicate5(): number; -+   ~~~~~~~~~~ ++6 duplicate5(): number; ++   ~~~~~~~~~~ + + file1.ts:6:5 - 'duplicate5' was also declared here. -+  6 duplicate5: () => string; -+    ~~~~~~~~~~ ++ 6 duplicate5: () => string; ++    ~~~~~~~~~~ + +file2.ts:7:5 - error TS2300: Duplicate identifier 'duplicate6'. + -+ 7 duplicate6(): number; -+   ~~~~~~~~~~ ++7 duplicate6(): number; ++   ~~~~~~~~~~ + + file1.ts:7:5 - 'duplicate6' was also declared here. -+  7 duplicate6: () => string; -+    ~~~~~~~~~~ ++ 7 duplicate6: () => string; ++    ~~~~~~~~~~ + +file2.ts:8:5 - error TS2300: Duplicate identifier 'duplicate7'. + -+ 8 duplicate7(): number; -+   ~~~~~~~~~~ ++8 duplicate7(): number; ++   ~~~~~~~~~~ + + file1.ts:8:5 - 'duplicate7' was also declared here. -+  8 duplicate7: () => string; -+    ~~~~~~~~~~ ++ 8 duplicate7: () => string; ++    ~~~~~~~~~~ + +file2.ts:9:5 - error TS2300: Duplicate identifier 'duplicate8'. + -+ 9 duplicate8(): number; -+   ~~~~~~~~~~ ++9 duplicate8(): number; ++   ~~~~~~~~~~ + + file1.ts:9:5 - 'duplicate8' was also declared here. -+  9 duplicate8: () => string; -+    ~~~~~~~~~~ ++ 9 duplicate8: () => string; ++    ~~~~~~~~~~ + + +==== file1.ts (8 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans5.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans5.errors.txt index f27c1aa417..21f53eb8eb 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans5.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans5.errors.txt @@ -4,8 +4,8 @@    ~~~~~~~~~~ file2.ts:4:9 - 'duplicate1' was also declared here. -  4 duplicate1(): number; -    ~~~~~~~~~~ + 4 duplicate1(): number; +    ~~~~~~~~~~ file1.ts:4:9 - error TS2300: Duplicate identifier 'duplicate2'. @@ -13,8 +13,8 @@    ~~~~~~~~~~ file2.ts:5:9 - 'duplicate2' was also declared here. -  5 duplicate2(): number; -    ~~~~~~~~~~ + 5 duplicate2(): number; +    ~~~~~~~~~~ file1.ts:5:9 - error TS2300: Duplicate identifier 'duplicate3'. @@ -22,13 +22,13 @@    ~~~~~~~~~~ file2.ts:6:9 - 'duplicate3' was also declared here. -  6 duplicate3(): number; -    ~~~~~~~~~~ + 6 duplicate3(): number; +    ~~~~~~~~~~ file2.ts:4:9 - error TS2300: Duplicate identifier 'duplicate1'. - 4 duplicate1(): number; -   ~~~~~~~~~~ +4 duplicate1(): number; +   ~~~~~~~~~~ file1.ts:3:9 - 'duplicate1' was also declared here. 3 duplicate1: () => string; @@ -36,8 +36,8 @@ file2.ts:5:9 - error TS2300: Duplicate identifier 'duplicate2'. - 5 duplicate2(): number; -   ~~~~~~~~~~ +5 duplicate2(): number; +   ~~~~~~~~~~ file1.ts:4:9 - 'duplicate2' was also declared here. 4 duplicate2: () => string; @@ -45,8 +45,8 @@ file2.ts:6:9 - error TS2300: Duplicate identifier 'duplicate3'. - 6 duplicate3(): number; -   ~~~~~~~~~~ +6 duplicate3(): number; +   ~~~~~~~~~~ file1.ts:5:9 - 'duplicate3' was also declared here. 5 duplicate3: () => string; diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans5.errors.txt.diff index d8c00a3f8b..05a39e8440 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans5.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans5.errors.txt.diff @@ -5,12 +5,10 @@    ~~~~~~~~~~ - file2.ts:4:9 -- 4 duplicate1(): number; --    ~~~~~~~~~~ -- 'duplicate1' was also declared here. + file2.ts:4:9 - 'duplicate1' was also declared here. -+  4 duplicate1(): number; -+    ~~~~~~~~~~ + 4 duplicate1(): number; +    ~~~~~~~~~~ +- 'duplicate1' was also declared here. + file1.ts:4:9 - error TS2300: Duplicate identifier 'duplicate2'. @@ -18,12 +16,10 @@    ~~~~~~~~~~ - file2.ts:5:9 -- 5 duplicate2(): number; --    ~~~~~~~~~~ -- 'duplicate2' was also declared here. + file2.ts:5:9 - 'duplicate2' was also declared here. -+  5 duplicate2(): number; -+    ~~~~~~~~~~ + 5 duplicate2(): number; +    ~~~~~~~~~~ +- 'duplicate2' was also declared here. + file1.ts:5:9 - error TS2300: Duplicate identifier 'duplicate3'. @@ -31,19 +27,15 @@    ~~~~~~~~~~ - file2.ts:6:9 -- 6 duplicate3(): number; --    ~~~~~~~~~~ -- 'duplicate3' was also declared here. + file2.ts:6:9 - 'duplicate3' was also declared here. -+  6 duplicate3(): number; -+    ~~~~~~~~~~ + 6 duplicate3(): number; +    ~~~~~~~~~~ +- 'duplicate3' was also declared here. + file2.ts:4:9 - error TS2300: Duplicate identifier 'duplicate1'. --4 duplicate1(): number; --   ~~~~~~~~~~ -+ 4 duplicate1(): number; -+   ~~~~~~~~~~ + 4 duplicate1(): number; +    ~~~~~~~~~~ - file1.ts:3:9 + file1.ts:3:9 - 'duplicate1' was also declared here. @@ -53,10 +45,8 @@ + file2.ts:5:9 - error TS2300: Duplicate identifier 'duplicate2'. --5 duplicate2(): number; --   ~~~~~~~~~~ -+ 5 duplicate2(): number; -+   ~~~~~~~~~~ + 5 duplicate2(): number; +    ~~~~~~~~~~ - file1.ts:4:9 + file1.ts:4:9 - 'duplicate2' was also declared here. @@ -66,10 +56,8 @@ + file2.ts:6:9 - error TS2300: Duplicate identifier 'duplicate3'. --6 duplicate3(): number; --   ~~~~~~~~~~ -+ 6 duplicate3(): number; -+   ~~~~~~~~~~ + 6 duplicate3(): number; +    ~~~~~~~~~~ - file1.ts:5:9 + file1.ts:5:9 - 'duplicate3' was also declared here. diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt index 45b558775f..6fe169252b 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt @@ -1,7 +1,7 @@ file2.ts:3:16 - error TS2664: Invalid module name in augmentation, module 'someMod' cannot be found. - 3 declare module "someMod" { -   ~~~~~~~~~ +3 declare module "someMod" { +   ~~~~~~~~~ ==== file2.ts (1 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt.diff index e0074810a6..b347682e7b 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt.diff @@ -6,8 +6,8 @@ -3 duplicate1: () => string; -   ~~~~~~~~~~ -+ 3 declare module "someMod" { -+   ~~~~~~~~~ ++3 declare module "someMod" { ++   ~~~~~~~~~ - file2.ts:5:9 - 5 duplicate1(): number; diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt index 47e0adf4ed..11fcb89173 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt @@ -1,7 +1,7 @@ file2.ts:3:16 - error TS2664: Invalid module name in augmentation, module 'someMod' cannot be found. - 3 declare module "someMod" { -   ~~~~~~~~~ +3 declare module "someMod" { +   ~~~~~~~~~ ==== file2.ts (1 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt.diff index 19fff65276..12881d8063 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt.diff @@ -6,23 +6,22 @@ -1 declare module "someMod" { -  ~~~~~~~ -+ 3 declare module "someMod" { -+   ~~~~~~~~~ - +- - file2.ts:3:1 - 3 declare module "someMod" { -   ~~~~~~~ - Conflicts are in this file. -file2.ts:3:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: duplicate1, duplicate2, duplicate3, duplicate4, duplicate5, duplicate6, duplicate7, duplicate8, duplicate9 - --3 declare module "someMod" { --  ~~~~~~~ - + 3 declare module "someMod" { +-  ~~~~~~~ ++   ~~~~~~~~~ + - file1.ts:1:1 - 1 declare module "someMod" { -   ~~~~~~~ - Conflicts are in this file. -- + - ==== file2.ts (1 errors) ==== ///