forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle private access chained on an optional chain
See the resolution from tc39/proposal-class-fields#301.
- Loading branch information
1 parent
d030793
commit b0e6902
Showing
33 changed files
with
2,831 additions
and
29 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
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
14 changes: 14 additions & 0 deletions
14
...parser/test/fixtures/experimental/class-private-properties/optional-chain-object/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,14 @@ | ||
class Foo { | ||
static #x = 1; | ||
static #m = function() {}; | ||
|
||
static test() { | ||
const o = { Foo: Foo }; | ||
return [ | ||
o?.Foo.#x, | ||
o?.Foo.#x.toFixed, | ||
o?.Foo.#x.toFixed(2), | ||
o?.Foo.#m(), | ||
]; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...er/test/fixtures/experimental/class-private-properties/optional-chain-object/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,3 @@ | ||
{ | ||
"plugins": ["classPrivateProperties"] | ||
} |
Oops, something went wrong.