Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added check to disallow super.private variable access and test case a…
…dded (#10472) * 🚀 added check to disallow super.private variable access and test case added * ♻️ change the other linting change back to how it was * ♻️ change the other linting change back to how it was * ♻️ added newline at the end test output.json file * ♻️ changed the linting style to the way it was * ♻️ updated error message, removed super private member access test cases from whitelist of flow and test 262 suite * ♻️ added newline in output.json
- Loading branch information
1 parent
46c70ad
commit b7333ea
Showing
5 changed files
with
19 additions
and
5 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
7 changes: 7 additions & 0 deletions
7
.../test/fixtures/experimental/class-private-properties/super-private-member-access/input.js
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class A extends B { | ||
#x; | ||
|
||
method() { | ||
super.#x; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...t/fixtures/experimental/class-private-properties/super-private-member-access/options.json
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
"classPrivateProperties" | ||
], | ||
"throws": "Private fields can't be accessed on super (5:4)" | ||
} |
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