Skip to content

Commit c2d8671

Browse files
author
Yui T
committed
Update baselines
1 parent a723411 commit c2d8671

File tree

142 files changed

+1709
-659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+1709
-659
lines changed

src/compiler/binder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module ts {
8484
if (node.name) {
8585
node.name.parent = node;
8686
}
87-
// Report errors every position with duplicate declarations
87+
// Report errors every position with duplicate declaration
8888
// Report errors on previous encountered declarations
8989
forEach(symbol.declarations, (declaration) => {
9090
file.semanticErrors.push(createDiagnosticForNode(declaration.name, Diagnostics.Duplicate_identifier_0, getDisplayName(declaration)));
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'.
1+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'.
2+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,5): error TS2300: Duplicate identifier 'fn'.
23

34

4-
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (1 errors) ====
5+
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (2 errors) ====
56
class clodule<T> {
67
id: string;
78
value: T;
89

910
static fn<U>(id: U) { }
11+
~~
12+
!!! error TS2300: Duplicate identifier 'fn'.
1013
}
1114

1215
module clodule {
1316
// error: duplicate identifier expected
1417
export function fn<T>(x: T, y: T): T {
15-
~~
16-
!!! error TS2300: Duplicate identifier 'fn'.
18+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1719
return x;
20+
~~~~~~~~~~~~~~~~~
1821
}
22+
~~~~~
23+
!!! error TS2300: Duplicate identifier 'fn'.
1924
}
2025

2126

Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'.
1+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'.
2+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,5): error TS2300: Duplicate identifier 'fn'.
23

34

4-
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (1 errors) ====
5+
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (2 errors) ====
56
class clodule<T> {
67
id: string;
78
value: T;
89

910
static fn(id: string) { }
11+
~~
12+
!!! error TS2300: Duplicate identifier 'fn'.
1013
}
1114

1215
module clodule {
1316
// error: duplicate identifier expected
1417
export function fn<T>(x: T, y: T): T {
15-
~~
16-
!!! error TS2300: Duplicate identifier 'fn'.
18+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1719
return x;
20+
~~~~~~~~~~~~~~~~~
1821
}
22+
~~~~~
23+
!!! error TS2300: Duplicate identifier 'fn'.
1924
}
2025

2126

Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,21): error TS2300: Duplicate identifier 'Origin'.
2-
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,25): error TS2300: Duplicate identifier 'Origin'.
1+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'.
2+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,5): error TS2300: Duplicate identifier 'Origin'.
3+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'.
4+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,9): error TS2300: Duplicate identifier 'Origin'.
35

46

5-
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (2 errors) ====
7+
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (4 errors) ====
68
class Point {
79
constructor(public x: number, public y: number) { }
810

911
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
12+
~~~~~~
13+
!!! error TS2300: Duplicate identifier 'Origin'.
1014
}
1115

1216
module Point {
1317
export function Origin() { return null; } //expected duplicate identifier error
14-
~~~~~~
18+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1519
!!! error TS2300: Duplicate identifier 'Origin'.
1620
}
1721

@@ -21,11 +25,13 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMer
2125
constructor(public x: number, public y: number) { }
2226

2327
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
28+
~~~~~~
29+
!!! error TS2300: Duplicate identifier 'Origin'.
2430
}
2531

2632
export module Point {
2733
export function Origin() { return ""; }//expected duplicate identifier error
28-
~~~~~~
34+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2935
!!! error TS2300: Duplicate identifier 'Origin'.
3036
}
3137
}

tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'.
12
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(8,16): error TS2300: Duplicate identifier 'Origin'.
3+
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'.
24
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(20,20): error TS2300: Duplicate identifier 'Origin'.
35

46

5-
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (2 errors) ====
7+
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (4 errors) ====
68
class Point {
79
constructor(public x: number, public y: number) { }
810

911
static Origin: Point = { x: 0, y: 0 };
12+
~~~~~~
13+
!!! error TS2300: Duplicate identifier 'Origin'.
1014
}
1115

1216
module Point {
@@ -21,6 +25,8 @@ tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMer
2125
constructor(public x: number, public y: number) { }
2226

2327
static Origin: Point = { x: 0, y: 0 };
28+
~~~~~~
29+
!!! error TS2300: Duplicate identifier 'Origin'.
2430
}
2531

2632
export module Point {

tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(2,18): error TS2300: Duplicate identifier 'Point'.
12
tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(10,18): error TS2300: Duplicate identifier 'Point'.
3+
tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(17,18): error TS2300: Duplicate identifier 'Line'.
24
tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(26,26): error TS2300: Duplicate identifier 'Line'.
35

46

5-
==== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (2 errors) ====
7+
==== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (4 errors) ====
68
module A {
79
export class Point {
10+
~~~~~
11+
!!! error TS2300: Duplicate identifier 'Point'.
812
x: number;
913
y: number;
1014
}
@@ -22,6 +26,8 @@ tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesTha
2226

2327
module X.Y.Z {
2428
export class Line {
29+
~~~~
30+
!!! error TS2300: Duplicate identifier 'Line'.
2531
length: number;
2632
}
2733
}
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
tests/cases/compiler/ambientClassOverloadForFunction.ts(2,10): error TS2300: Duplicate identifier 'foo'.
1+
tests/cases/compiler/ambientClassOverloadForFunction.ts(1,15): error TS2300: Duplicate identifier 'foo'.
2+
tests/cases/compiler/ambientClassOverloadForFunction.ts(2,1): error TS2300: Duplicate identifier 'foo'.
23

34

4-
==== tests/cases/compiler/ambientClassOverloadForFunction.ts (1 errors) ====
5+
==== tests/cases/compiler/ambientClassOverloadForFunction.ts (2 errors) ====
56
declare class foo{};
7+
~~~
8+
!!! error TS2300: Duplicate identifier 'foo'.
69
function foo() { return null; }
7-
~~~
10+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
811
!!! error TS2300: Duplicate identifier 'foo'.
912

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
tests/cases/compiler/anyDeclare.ts(4,14): error TS2300: Duplicate identifier 'myFn'.
1+
tests/cases/compiler/anyDeclare.ts(3,9): error TS2300: Duplicate identifier 'myFn'.
2+
tests/cases/compiler/anyDeclare.ts(4,5): error TS2300: Duplicate identifier 'myFn'.
23

34

4-
==== tests/cases/compiler/anyDeclare.ts (1 errors) ====
5+
==== tests/cases/compiler/anyDeclare.ts (2 errors) ====
56
declare var x: any;
67
module myMod {
78
var myFn;
9+
~~~~
10+
!!! error TS2300: Duplicate identifier 'myFn'.
811
function myFn() { }
9-
~~~~
12+
~~~~~~~~~~~~~~~~~~~~
1013
!!! error TS2300: Duplicate identifier 'myFn'.
1114
}
1215

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1+
tests/cases/compiler/augmentedTypesClass.ts(2,7): error TS2300: Duplicate identifier 'c1'.
12
tests/cases/compiler/augmentedTypesClass.ts(3,5): error TS2300: Duplicate identifier 'c1'.
3+
tests/cases/compiler/augmentedTypesClass.ts(6,7): error TS2300: Duplicate identifier 'c4'.
24
tests/cases/compiler/augmentedTypesClass.ts(7,6): error TS2300: Duplicate identifier 'c4'.
35

46

5-
==== tests/cases/compiler/augmentedTypesClass.ts (2 errors) ====
7+
==== tests/cases/compiler/augmentedTypesClass.ts (4 errors) ====
68
//// class then var
79
class c1 { public foo() { } }
10+
~~
11+
!!! error TS2300: Duplicate identifier 'c1'.
812
var c1 = 1; // error
913
~~
1014
!!! error TS2300: Duplicate identifier 'c1'.
1115

1216
//// class then enum
1317
class c4 { public foo() { } }
18+
~~
19+
!!! error TS2300: Duplicate identifier 'c4'.
1420
enum c4 { One } // error
1521
~~
1622
!!! error TS2300: Duplicate identifier 'c4'.

tests/baselines/reference/augmentedTypesClass2.errors.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
tests/cases/compiler/augmentedTypesClass2.ts(4,7): error TS2300: Duplicate identifier 'c11'.
12
tests/cases/compiler/augmentedTypesClass2.ts(10,11): error TS2300: Duplicate identifier 'c11'.
3+
tests/cases/compiler/augmentedTypesClass2.ts(16,7): error TS2300: Duplicate identifier 'c33'.
24
tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate identifier 'c33'.
35

46

5-
==== tests/cases/compiler/augmentedTypesClass2.ts (2 errors) ====
7+
==== tests/cases/compiler/augmentedTypesClass2.ts (4 errors) ====
68
// Checking class with other things in type space not value space
79

810
// class then interface
9-
class c11 {
11+
class c11 { // error
12+
~~~
13+
!!! error TS2300: Duplicate identifier 'c11'.
1014
foo() {
1115
return 1;
1216
}
@@ -21,6 +25,8 @@ tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate iden
2125
// class then class - covered
2226
// class then enum
2327
class c33 {
28+
~~~
29+
!!! error TS2300: Duplicate identifier 'c33'.
2430
foo() {
2531
return 1;
2632
}

0 commit comments

Comments
 (0)