Skip to content

Commit 71c384a

Browse files
author
Joey Watts
committed
Update baselines for private name errors
Signed-off-by: Joey Watts <[email protected]>
1 parent 5bea122 commit 71c384a

9 files changed

+22
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/classes/members/privateNames/privateNameConstructorReserved.ts(4,5): error TS1811: '#constructor' is a reserved word.
1+
tests/cases/conformance/classes/members/privateNames/privateNameConstructorReserved.ts(4,5): error TS18012: '#constructor' is a reserved word.
22

33

44
==== tests/cases/conformance/classes/members/privateNames/privateNameConstructorReserved.ts (1 errors) ====
@@ -7,6 +7,6 @@ tests/cases/conformance/classes/members/privateNames/privateNameConstructorReser
77
class A {
88
#constructor() {} // Error: `#constructor` is a reserved word.
99
~~~~~~~~~~~~
10-
!!! error TS1811: '#constructor' is a reserved word.
10+
!!! error TS18012: '#constructor' is a reserved word.
1111
}
1212

Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
tests/cases/conformance/classes/members/privateNames/privateNameInObjectLiteral-1.ts(2,5): error TS18015: Private names are not allowed outside class bodies.
1+
tests/cases/conformance/classes/members/privateNames/privateNameInObjectLiteral-1.ts(2,5): error TS18016: Private names are not allowed outside class bodies.
22

33

44
==== tests/cases/conformance/classes/members/privateNames/privateNameInObjectLiteral-1.ts (1 errors) ====
55
const obj = {
66
#foo: 1
77
~~~~
8-
!!! error TS18015: Private names are not allowed outside class bodies.
8+
!!! error TS18016: Private names are not allowed outside class bodies.
99
};
1010

tests/baselines/reference/privateNameInObjectLiteral-2.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
tests/cases/conformance/classes/members/privateNames/privateNameInObjectLiteral-2.ts(2,5): error TS18015: Private names are not allowed outside class bodies.
1+
tests/cases/conformance/classes/members/privateNames/privateNameInObjectLiteral-2.ts(2,5): error TS18016: Private names are not allowed outside class bodies.
22

33

44
==== tests/cases/conformance/classes/members/privateNames/privateNameInObjectLiteral-2.ts (1 errors) ====
55
const obj = {
66
#foo() {
77
~~~~
8-
!!! error TS18015: Private names are not allowed outside class bodies.
8+
!!! error TS18016: Private names are not allowed outside class bodies.
99

1010
}
1111
};

tests/baselines/reference/privateNameNotAccessibleOutsideDefiningClass.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/classes/members/privateNames/privateNameNotAccessibleOutsideDefiningClass.ts(7,9): error TS2339: Property '#foo' does not exist on type 'A'.
2-
tests/cases/conformance/classes/members/privateNames/privateNameNotAccessibleOutsideDefiningClass.ts(7,9): error TS18012: Property '#foo' is not accessible outside class 'A' because it has a private name.
2+
tests/cases/conformance/classes/members/privateNames/privateNameNotAccessibleOutsideDefiningClass.ts(7,9): error TS18013: Property '#foo' is not accessible outside class 'A' because it has a private name.
33

44

55
==== tests/cases/conformance/classes/members/privateNames/privateNameNotAccessibleOutsideDefiningClass.ts (2 errors) ====
@@ -13,5 +13,5 @@ tests/cases/conformance/classes/members/privateNames/privateNameNotAccessibleOut
1313
~~~~
1414
!!! error TS2339: Property '#foo' does not exist on type 'A'.
1515
~~~~
16-
!!! error TS18012: Property '#foo' is not accessible outside class 'A' because it has a private name.
16+
!!! error TS18013: Property '#foo' is not accessible outside class 'A' because it has a private name.
1717

tests/baselines/reference/privateNamesAndGenericClasses-2.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/classes/members/privateNames/privateNamesAndGenericClasses-2.ts(24,3): error TS2339: Property '#foo' does not exist on type 'C<number>'.
2-
tests/cases/conformance/classes/members/privateNames/privateNamesAndGenericClasses-2.ts(24,3): error TS18012: Property '#foo' is not accessible outside class 'C<T>' because it has a private name.
2+
tests/cases/conformance/classes/members/privateNames/privateNamesAndGenericClasses-2.ts(24,3): error TS18013: Property '#foo' is not accessible outside class 'C<T>' because it has a private name.
33
tests/cases/conformance/classes/members/privateNames/privateNamesAndGenericClasses-2.ts(25,1): error TS2322: Type 'C<string>' is not assignable to type 'C<number>'.
44
Type 'string' is not assignable to type 'number'.
55
tests/cases/conformance/classes/members/privateNames/privateNamesAndGenericClasses-2.ts(26,1): error TS2322: Type 'C<number>' is not assignable to type 'C<string>'.
@@ -34,7 +34,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesAndGenericClass
3434
~~~~
3535
!!! error TS2339: Property '#foo' does not exist on type 'C<number>'.
3636
~~~~
37-
!!! error TS18012: Property '#foo' is not accessible outside class 'C<T>' because it has a private name.
37+
!!! error TS18013: Property '#foo' is not accessible outside class 'C<T>' because it has a private name.
3838
a = b; // Error
3939
~
4040
!!! error TS2322: Type 'C<string>' is not assignable to type 'C<number>'.

tests/baselines/reference/privateNamesInGenericClasses.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/classes/members/privateNames/privateNamesInGenericClasses.ts(10,3): error TS2339: Property '#foo' does not exist on type 'C<number>'.
2-
tests/cases/conformance/classes/members/privateNames/privateNamesInGenericClasses.ts(10,3): error TS18012: Property '#foo' is not accessible outside class 'C<T>' because it has a private name.
2+
tests/cases/conformance/classes/members/privateNames/privateNamesInGenericClasses.ts(10,3): error TS18013: Property '#foo' is not accessible outside class 'C<T>' because it has a private name.
33
tests/cases/conformance/classes/members/privateNames/privateNamesInGenericClasses.ts(11,1): error TS2322: Type 'C<string>' is not assignable to type 'C<number>'.
44
Type 'string' is not assignable to type 'number'.
55
tests/cases/conformance/classes/members/privateNames/privateNamesInGenericClasses.ts(12,1): error TS2322: Type 'C<number>' is not assignable to type 'C<string>'.
@@ -20,7 +20,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesInGenericClasse
2020
~~~~
2121
!!! error TS2339: Property '#foo' does not exist on type 'C<number>'.
2222
~~~~
23-
!!! error TS18012: Property '#foo' is not accessible outside class 'C<T>' because it has a private name.
23+
!!! error TS18013: Property '#foo' is not accessible outside class 'C<T>' because it has a private name.
2424
a = b; // Error
2525
~
2626
!!! error TS2322: Type 'C<string>' is not assignable to type 'C<number>'.

tests/baselines/reference/privateNamesInNestedClasses.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/classes/members/privateNames/privateNamesInNestedClasses.ts(13,18): error TS2339: Property '#foo' does not exist on type 'A'.
2-
tests/cases/conformance/classes/members/privateNames/privateNamesInNestedClasses.ts(13,18): error TS18013: This usage of '#foo' refers to the private member declared in its enclosing class. While type 'B' has a private member with the same spelling, its declaration and accessibility are distinct.
2+
tests/cases/conformance/classes/members/privateNames/privateNamesInNestedClasses.ts(13,18): error TS18014: This usage of '#foo' refers to the private member declared in its enclosing class. While type 'B' has a private member with the same spelling, its declaration and accessibility are distinct.
33

44

55
==== tests/cases/conformance/classes/members/privateNames/privateNamesInNestedClasses.ts (2 errors) ====
@@ -19,7 +19,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesInNestedClasses
1919
~~~~
2020
!!! error TS2339: Property '#foo' does not exist on type 'A'.
2121
~~~~
22-
!!! error TS18013: This usage of '#foo' refers to the private member declared in its enclosing class. While type 'B' has a private member with the same spelling, its declaration and accessibility are distinct.
22+
!!! error TS18014: This usage of '#foo' refers to the private member declared in its enclosing class. While type 'B' has a private member with the same spelling, its declaration and accessibility are distinct.
2323
}
2424
quux (b: B) {
2525
b.#foo; // OK
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/conformance/classes/members/privateNames/privateNamesNoAccessibilityModifiers.ts(4,12): error TS18009: Accessibility modifiers cannot be used with private names.
2-
tests/cases/conformance/classes/members/privateNames/privateNamesNoAccessibilityModifiers.ts(5,13): error TS18009: Accessibility modifiers cannot be used with private names.
3-
tests/cases/conformance/classes/members/privateNames/privateNamesNoAccessibilityModifiers.ts(6,15): error TS18009: Accessibility modifiers cannot be used with private names.
1+
tests/cases/conformance/classes/members/privateNames/privateNamesNoAccessibilityModifiers.ts(4,12): error TS18010: Accessibility modifiers cannot be used with private names.
2+
tests/cases/conformance/classes/members/privateNames/privateNamesNoAccessibilityModifiers.ts(5,13): error TS18010: Accessibility modifiers cannot be used with private names.
3+
tests/cases/conformance/classes/members/privateNames/privateNamesNoAccessibilityModifiers.ts(6,15): error TS18010: Accessibility modifiers cannot be used with private names.
44

55

66
==== tests/cases/conformance/classes/members/privateNames/privateNamesNoAccessibilityModifiers.ts (3 errors) ====
@@ -9,13 +9,13 @@ tests/cases/conformance/classes/members/privateNames/privateNamesNoAccessibility
99
class A {
1010
public #foo = 3; // Error
1111
~~~~
12-
!!! error TS18009: Accessibility modifiers cannot be used with private names.
12+
!!! error TS18010: Accessibility modifiers cannot be used with private names.
1313
private #bar = 3; // Error
1414
~~~~
15-
!!! error TS18009: Accessibility modifiers cannot be used with private names.
15+
!!! error TS18010: Accessibility modifiers cannot be used with private names.
1616
protected #baz = 3; // Error
1717
~~~~
18-
!!! error TS18009: Accessibility modifiers cannot be used with private names.
18+
!!! error TS18010: Accessibility modifiers cannot be used with private names.
1919
readonly #qux = 3; // OK
2020
}
2121

tests/baselines/reference/privateNamesNoDelete.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/classes/members/privateNames/privateNamesNoDelete.ts(6,16): error TS18010: The operand of a delete operator cannot be a private name.
1+
tests/cases/conformance/classes/members/privateNames/privateNamesNoDelete.ts(6,16): error TS18011: The operand of a delete operator cannot be a private name.
22

33

44
==== tests/cases/conformance/classes/members/privateNames/privateNamesNoDelete.ts (1 errors) ====
@@ -9,7 +9,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesNoDelete.ts(6,1
99
constructor() {
1010
delete this.#v; // Error: The operand of a delete operator cannot be a private name.
1111
~~~~~~~
12-
!!! error TS18010: The operand of a delete operator cannot be a private name.
12+
!!! error TS18011: The operand of a delete operator cannot be a private name.
1313
}
1414
}
1515

0 commit comments

Comments
 (0)