8000 Merge pull request #8819 from RyanCavanaugh/fixBaselines · regisp/TypeScript@f5a52ee · GitHub
[go: up one dir, main page]

Skip to content

Commit f5a52ee

Browse files
committed
Merge pull request microsoft#8819 from RyanCavanaugh/fixBaselines
Fix broken baselines
2 parents c9050db + 34e8560 commit f5a52ee

14 files changed

+79
-68
lines changed

src/compiler/checker.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12972,18 +12972,20 @@ namespace ts {
1297212972
const names = static ? staticNames : instanceNames;
1297312973

1297412974
const memberName = member.name && getPropertyNameForPropertyNameNode(member.name);
12975-
switch (member.kind) {
12976-
case SyntaxKind.GetAccessor:
12977-
addName(names, member.name, memberName, getter);
12978-
break;
12975+
if (memberName) {
12976+
switch (member.kind) {
12977+
case SyntaxKind.GetAccessor:
12978+
addName(names, member.name, memberName, getter);
12979+
break;
1297912980

12980-
case SyntaxKind.SetAccessor:
12981-
addName(names, member.name, memberName, setter);
12982-
break;
12981+
case SyntaxKind.SetAccessor:
12982+
addName(names, member.name, memberName, setter);
12983+
break;
1298312984

12984-
case SyntaxKind.PropertyDeclaration:
12985-
addName(names, member.name, memberName, property);
12986-
break;
12985+
case SyntaxKind.PropertyDeclaration:
12986+
addName(names, member.name, memberName, property);
12987+
break;
12988+
}
1298712989
}
1298812990
}
1298912991
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(10,15): error TS2686: All declarations of 'x' must have identical modifiers.
2-
tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(14,5): error TS2686: All declarations of 'x' must have identical modifiers.
3-
tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(18,13): error TS2686: All declarations of 'x' must have identical modifiers.
4-
tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(22,5): error TS2686: All declarations of 'x' must have identical modifiers.
1+
tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(10,15): error TS2687: All declarations of 'x' must have identical modifiers.
2+
tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(14,5): error TS2687: All declarations of 'x' must have identical modifiers.
3+
tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(18,13): error TS2687: All declarations of 'x' must have identical modifiers.
4+
tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts(22,5): error TS2687: All declarations of 'x' must have identical modifiers.
55

66

77
==== tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflictingMembers.ts (4 errors) ====
@@ -16,23 +16,23 @@ tests/cases/conformance/classes/classDeclarations/classAndInterfaceMergeConflict
1616
declare class C2 {
1717
protected x : number;
1818
~
19-
!!! error TS2686: All declarations of 'x' must have identical modifiers.
19+
!!! error TS2687: All declarations of 'x' must have identical modifiers.
2020
}
2121

2222
interface C2 {
2323
x : number;
2424
~
25-
!!! error TS2686: All declarations of 'x' must have identical modifiers.
25+
!!! error TS2687: All declarations of 'x' must have identical modifiers.
2626
}
2727

2828
declare class C3 {
2929
private x : number;
3030
~
31-
!!! error TS2686: All declarations of 'x' must have identical modifiers.
31+
!!! error TS2687: All declarations of 'x' must have identical modifiers.
3232
}
3333

3434
interface C3 {
3535
x : number;
3636
~
37-
!!! error TS2686: All declarations of 'x' must have identical modifiers.
37+
!!! error TS2687: All declarations of 'x' must have identical modifiers.
3838
}

tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,17): error TS2369: A parameter property is only allowed in a constructor implementation.
22
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(4,27): error TS2369: A parameter property is only allowed in a constructor implementation.
3+
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,24): error TS2300: Duplicate identifier 'x'.
4+
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(5,35): error TS2300: Duplicate identifier 'y'.
35
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(9,17): error TS2369: A parameter property is only allowed in a constructor implementation.
4-
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(9,25): error TS2686: All declarations of 'x' must have identical modifiers.
5-
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,24): error TS2686: All declarations of 'x' must have identical modifiers.
6+
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(9,25): error TS2687: All declarations of 'x' must have identical modifiers.
7+
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,24): error TS2300: Duplicate identifier 'x'.
8+
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(10,24): error TS2687: All declarations of 'x' must have identical modifiers.
69
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(14,17): error TS2369: A parameter property is only allowed in a constructor implementation.
710
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(19,10): error TS2369: A parameter property is only allowed in a constructor implementation.
811
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(20,10): error TS2369: A parameter property is only allowed in a constructor implementation.
@@ -14,7 +17,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatur
1417
tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts(35,10): error TS2369: A parameter property is only allowed in a constructor implementation.
1518

1619

17-
==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts (14 errors) ====
20+
==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatureWithAccessibilityModifiersOnParameters2.ts (17 errors) ====
1821
// Parameter properties are not valid in overloads of constructors
1922

2023
class C {
@@ -24,17 +27,23 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/constructSignatur
2427
~~~~~~~~~
2528
!!! error TS2369: A parameter property is only allowed in a constructor implementation.
2629
constructor(public x, private y) { }
30+
~
31+
!!! error TS2300: Duplicate identifier 'x'.
32+
~
33+
!!! error TS2300: Duplicate identifier 'y'.
2734
}
2835

2936
class C2 {
3037
constructor(private x);
3138
~~~~~~~~~
3239
!!! error TS2369: A parameter property is only allowed in a constructor implementation.
3340
~
34-
!!! error TS2686: All declarations of 'x' must have identical modifiers.
41+
!!! error TS2687: All declarations of 'x' must have identical modifiers.
3542
constructor(public x) { }
3643
~
37-
!!! error TS2686: All declarations of 'x' must have identical modifiers.
44+
!!! error TS2300: Duplicate identifier 'x'.
45+
~
46+
!!! error TS2687: All declarations of 'x' must have identical modifiers.
3847
}
3948

4049
class C3 {

tests/baselines/reference/constructorParameterProperties2.errors.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(11,24): error TS2300: Duplicate identifier 'y'.
2-
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(18,5): error TS2686: All declarations of 'y' must have identical modifiers.
2+
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(18,5): error TS2687: All declarations of 'y' must have identical modifiers.
33
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2300: Duplicate identifier 'y'.
4-
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2686: All declarations of 'y' must have identical modifiers.
5-
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(26,5): error TS2686: All declarations of 'y' must have identical modifiers.
4+
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2687: All declarations of 'y' must have identical modifiers.
5+
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(26,5): error TS2687: All declarations of 'y' must have identical modifiers.
66
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,27): error TS2300: Duplicate identifier 'y'.
7-
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,27): error TS2686: All declarations of 'y' must have identical modifiers.
7+
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,27): error TS2687: All declarations of 'y' must have identical modifiers.
88

99

1010
==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts (7 errors) ====
@@ -29,12 +29,12 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co
2929
class E {
3030
y: number;
3131
~
32-
!!! error TS2686: All declarations of 'y' must have identical modifiers.
32+
!!! error TS2687: All declarations of 'y' must have identical modifiers.
3333
constructor(private y: number) { } // error
3434
~
3535
!!! error TS2300: Duplicate identifier 'y'.
3636
~
37-
!!! error TS2686: All declarations of 'y' must have identical modifiers.
37+
!!! error TS2687: All declarations of 'y' must have identical modifiers.
3838
}
3939

4040
var e: E;
@@ -43,12 +43,12 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co
4343
class F {
4444
y: number;
4545
~
46-
!!! error TS2686: All declarations of 'y' must have identical modifiers.
46+
!!! error TS2687: All declarations of 'y' must have identical modifiers.
4747
constructor(protected y: number) { } // error
4848
~
4949
!!! error TS2300: Duplicate identifier 'y'.
5050
~
51-
!!! error TS2686: All declarations of 'y' must have identical modifiers.
51+
!!! error TS2687: All declarations of 'y' must have identical modifiers.
5252
}
5353

5454
var f: F;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
tests/cases/compiler/duplicateIdentifierComputedName.ts(3,5): error TS2300: Duplicate identifier 'a'.
1+
tests/cases/compiler/duplicateIdentifierComputedName.ts(3,5): error TS2300: Duplicate identifier '["a"]'.
22

33

44
==== tests/cases/compiler/duplicateIdentifierComputedName.ts (1 errors) ====
55
class C {
66
["a"]: string;
77
["a"]: string;
88
~~~~~
9-
!!! error TS2300: Duplicate identifier 'a'.
9+
!!! error TS2300: Duplicate identifier '["a"]'.
1010
}
1111

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(2,15): error TS2686: All declarations of 'x' must have identical modifiers.
2-
tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(3,15): error TS2686: All declarations of 'x' must have identical modifiers.
3-
tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(16,11): error TS2686: All declarations of 'y' must have identical modifiers.
4-
tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(20,3): error TS2686: All declarations of 'y' must have identical modifiers.
1+
tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(2,15): error TS2687: All declarations of 'x' must have identical modifiers.
2+
tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(3,15): error TS2687: All declarations of 'x' must have identical modifiers.
3+
tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(16,11): error TS2687: All declarations of 'y' must have identical modifiers.
4+
tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(20,3): error TS2687: All declarations of 'y' must have identical modifiers.
55

66

77
==== tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts (4 errors) ====
88
// Not OK
99
interface B { x; }
1010
~
11-
!!! error TS2686: All declarations of 'x' must have identical modifiers.
11+
!!! error TS2687: All declarations of 'x' must have identical modifiers.
1212
interface B { x?; }
1313
~
14-
!!! error TS2686: All declarations of 'x' must have identical modifiers.
14+
!!! error TS2687: All declarations of 'x' must have identical modifiers.
1515

1616
// OK
1717
class A {
@@ -26,12 +26,12 @@ tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts(20,3): error TS268
2626
class C {
2727
private y: string;
2828
~
29-
!!! error TS2686: All declarations of 'y' must have identical modifiers.
29+
!!! error TS2687: All declarations of 'y' must have identical modifiers.
3030
}
3131

3232
interface C {
3333
y: string;
3434
~
35-
!!! error TS2686: All declarations of 'y' must have identical modifiers.
35+
!!! error TS2687: All declarations of 'y' must have identical modifiers.
3636
}
3737

tests/baselines/reference/numericClassMembers1.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
tests/cases/compiler/numericClassMembers1.ts(3,3): error TS2300: Duplicate identifier '0'.
2-
tests/cases/compiler/numericClassMembers1.ts(8,2): error TS2300: Duplicate identifier '0'.
1+
tests/cases/compiler/numericClassMembers1.ts(3,3): error TS2300: Duplicate identifier '0.0'.
2+
tests/cases/compiler/numericClassMembers1.ts(8,2): error TS2300: Duplicate identifier ''0''.
33

44

55
==== tests/cases/compiler/numericClassMembers1.ts (2 errors) ====
66
class C234 {
77
0 = 1;
88
0.0 = 2;
99
~~~
10-
!!! error TS2300: Duplicate identifier '0'.
10+
!!! error TS2300: Duplicate identifier '0.0'.
1111
}
1212

1313
class C235 {
1414
0.0 = 1;
1515
'0' = 2;
1616
~~~
17-
!!! error TS2300: Duplicate identifier '0'.
17+
!!! error TS2300: Duplicate identifier ''0''.
1818
}
1919

2020
class C236 {

tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(3,5): error TS2300: Duplicate identifier '1'.
1+
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(3,5): error TS2300: Duplicate identifier '1.0'.
22
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(5,12): error TS2300: Duplicate identifier '2'.
33
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(9,5): error TS2300: Duplicate identifier '2'.
44
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedPropertyDuplicates.ts(10,5): error TS2300: Duplicate identifier '2'.
@@ -12,7 +12,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericNamedP
1212
1: number;
1313
1.0: number;
1414
~~~
15-
!!! error TS2300: Duplicate identifier '1'.
15+
!!! error TS2300: Duplicate identifier '1.0'.
1616
static 2: number;
1717
static 2: number;
1818
~

tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(6,5): error TS2300: Duplicate identifier '1'.
1+
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(6,5): error TS2300: Duplicate identifier '1.0'.
22
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(10,5): error TS2300: Duplicate identifier '1'.
33
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(12,5): error TS2300: Duplicate identifier '1'.
44
tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericStringNamedPropertyEquivalence.ts(16,5): error TS2300: Duplicate identifier '1'.
@@ -15,7 +15,7 @@ tests/cases/conformance/types/objectTypeLiteral/propertySignatures/numericString
1515
"1.0": number; // not a duplicate
1616
1.0: number;
1717
~~~
18-
!!! error TS2300: Duplicate identifier '1'.
18+
!!! error TS2300: Duplicate identifier '1.0'.
1919
}
2020

2121
interface I {

tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(6,5): error TS2300: Duplicate identifier '1'.
2-
tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(7,5): error TS2300: Duplicate identifier '1'.
3-
tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(8,5): error TS2300: Duplicate identifier '1'.
1+
tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(6,5): error TS2300: Duplicate identifier '1.0'.
2+
tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(7,5): error TS2300: Duplicate identifier '1.'.
3+
tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(8,5): error TS2300: Duplicate identifier '1.00'.
44
tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(12,5): error TS2300: Duplicate identifier '1'.
55
tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(13,5): error TS2300: Duplicate identifier '1'.
66
tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(14,5): error TS2300: Duplicate identifier '1'.
@@ -22,13 +22,13 @@ tests/cases/conformance/types/members/objectTypeWithDuplicateNumericProperty.ts(
2222
1;
2323
1.0;
2424
~~~
25-
!!! error TS2300: Duplicate identifier '1'.
25+
!!! error TS2300: Duplicate identifier '1.0'.
2626
1.;
2727
~~
28-
!!! error TS2300: Duplicate identifier '1'.
28+
!!! error TS2300: Duplicate identifier '1.'.
2929
1.00;
3030
~~~~
31-
!!! error TS2300: Duplicate identifier '1'.
31+
!!! error TS2300: Duplicate identifier '1.00'.
3232
}
3333

3434
interface I {

0 commit comments

Comments
 (0)
0