-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Component commits: 21eb38b Fix for crash when using ca call expression on private identifier coming from an any typed variable. (GH #42860) Co-authored-by: Titian Cernicova-Dragomir <[email protected]>
- Loading branch information
1 parent
57ba6dd
commit 30368d0
Showing
6 changed files
with
145 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,46 @@ | ||
tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(5,15): error TS2339: Property '#bar' does not exist on type 'any'. | ||
tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(9,9): error TS2571: Object is of type 'unknown'. | ||
tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(10,9): error TS2571: Object is of type 'unknown'. | ||
tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(10,15): error TS2339: Property '#bar' does not exist on type 'any'. | ||
tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(11,9): error TS2571: Object is of type 'unknown'. | ||
tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(14,15): error TS2339: Property '#foo' does not exist on type 'never'. | ||
tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(15,15): error TS2339: Property '#bar' does not exist on type 'never'. | ||
tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts(16,15): error TS2339: Property '#foo' does not exist on type 'never'. | ||
|
||
|
||
==== tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts (1 errors) ==== | ||
==== tests/cases/conformance/classes/members/privateNames/privateNameAndAny.ts (8 errors) ==== | ||
class A { | ||
#foo = true; | ||
method(thing: any) { | ||
thing.#foo; // OK | ||
thing.#bar; // Error | ||
~~~~ | ||
!!! error TS2339: Property '#bar' does not exist on type 'any'. | ||
thing.#foo(); | ||
} | ||
methodU(thing: unknown) { | ||
thing.#foo; | ||
~~~~~ | ||
!!! error TS2571: Object is of type 'unknown'. | ||
thing.#bar; | ||
~~~~~ | ||
!!! error TS2571: Object is of type 'unknown'. | ||
~~~~ | ||
!!! error TS2339: Property '#bar' does not exist on type 'any'. | ||
thing.#foo(); | ||
~~~~~ | ||
!!! error TS2571: Object is of type 'unknown'. | ||
} | ||
methodN(thing: never) { | ||
thing.#foo; | ||
~~~~ | ||
!!! error TS2339: Property '#foo' does not exist on type 'never'. | ||
thing.#bar; | ||
~~~~ | ||
!!! error TS2339: Property '#bar' does not exist on type 'never'. | ||
thing.#foo(); | ||
~~~~ | ||
!!! error TS2339: Property '#foo' does not exist on type 'never'. | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters