-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/typescript): Handle accessibility in private method (#8689)
**Related issue:** - Closes #8687
- Loading branch information
1 parent
5ae0a2f
commit baba663
Showing
5 changed files
with
70 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Foo { | ||
private #p1() { } | ||
private #p2: number; | ||
} |
16 changes: 16 additions & 0 deletions
16
crates/swc_ecma_parser/tests/errors/issue-8687/input.ts.swc-stderr
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,16 @@ | ||
|
||
x An accessibility modifier cannot be used with a private identifier. | ||
,-[$DIR/tests/errors/issue-8687/input.ts:1:1] | ||
1 | class Foo { | ||
2 | private #p1() { } | ||
: ^^^^^^^^^^^ | ||
3 | private #p2: number; | ||
`---- | ||
|
||
x An accessibility modifier cannot be used with a private identifier. | ||
,-[$DIR/tests/errors/issue-8687/input.ts:2:1] | ||
2 | private #p1() { } | ||
3 | private #p2: number; | ||
: ^^^^^^^^^^^ | ||
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