mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Fix baselines from bad merge (#47177)
Conflict between #47018 and #46824, both of which changed the behaviour of private fields.
This commit is contained in:
parent
a42379179b
commit
8a5d476ec9
@ -1,15 +1,13 @@
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(21,29): error TS2571: Object is of type 'unknown'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(23,19): error TS2304: Cannot find name '#fiel'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(23,19): error TS2339: Property '#fiel' does not exist on type 'any'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(25,20): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(27,14): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(27,14): error TS2406: The left-hand side of a 'for...in' statement must be a variable or a property access.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(29,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'boolean'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(43,27): error TS2531: Object is possibly 'null'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(114,12): error TS18016: Private identifiers are not allowed outside class bodies.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts (9 errors) ====
|
||||
==== tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts (7 errors) ====
|
||||
class Foo {
|
||||
#field = 1;
|
||||
static #staticField = 2;
|
||||
@ -36,8 +34,6 @@ tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.t
|
||||
|
||||
const b = #fiel in v; // Bad - typo in privateID
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name '#fiel'.
|
||||
~~~~~
|
||||
!!! error TS2339: Property '#fiel' does not exist on type 'any'.
|
||||
|
||||
const c = (#field) in v; // Bad - privateID is not an expression on its own
|
||||
@ -46,8 +42,6 @@ tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.t
|
||||
|
||||
for (#field in v) { /**/ } // Bad - 'in' not allowed
|
||||
~~~~~~
|
||||
!!! error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression
|
||||
~~~~~~
|
||||
!!! error TS2406: The left-hand side of a 'for...in' statement must be a variable or a property access.
|
||||
|
||||
for (let d in #field in v) { /**/ } // Bad - rhs of in should be a object/any
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(21,29): error TS2571: Object is of type 'unknown'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(23,19): error TS2304: Cannot find name '#fiel'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(23,19): error TS2339: Property '#fiel' does not exist on type 'any'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(25,20): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(27,14): error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(27,14): error TS2406: The left-hand side of a 'for...in' statement must be a variable or a property access.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(29,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'boolean'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(43,27): error TS2531: Object is possibly 'null'.
|
||||
tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts(114,12): error TS18016: Private identifiers are not allowed outside class bodies.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts (9 errors) ====
|
||||
==== tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.ts (7 errors) ====
|
||||
class Foo {
|
||||
#field = 1;
|
||||
static #staticField = 2;
|
||||
@ -36,8 +34,6 @@ tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.t
|
||||
|
||||
const b = #fiel in v; // Bad - typo in privateID
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name '#fiel'.
|
||||
~~~~~
|
||||
!!! error TS2339: Property '#fiel' does not exist on type 'any'.
|
||||
|
||||
const c = (#field) in v; // Bad - privateID is not an expression on its own
|
||||
@ -46,8 +42,6 @@ tests/cases/conformance/classes/members/privateNames/privateNameInInExpression.t
|
||||
|
||||
for (#field in v) { /**/ } // Bad - 'in' not allowed
|
||||
~~~~~~
|
||||
!!! error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression
|
||||
~~~~~~
|
||||
!!! error TS2406: The left-hand side of a 'for...in' statement must be a variable or a property access.
|
||||
|
||||
for (let d in #field in v) { /**/ } // Bad - rhs of in should be a object/any
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user