[P2] Parser rejects ECMAScript private getter and setter names
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- csharp, typescript
- Domain
- compilers
Research direction
Start with ParseAccessorName and the parser tests or harnesses for class accessors; the issue reports the failure occurs before either engine runs. Compare private getter and setter syntax with the already supported public accessors and private fields or methods, then check how the parser preserves class-owned private-name identity and brands. Done means both engines accept getter-only and setter-only private accessors while enforcing duplicate and brand restrictions, separately from #3477's element transport work.
Written by the indexing model from the issue text.
Description
ECMAScript private accessor syntax is rejected before either execution engine can run:
class C { get #value() { return 7; } read() { return this.#value; } }
console.log(new C().read());
Pinned TypeScript 6.0.3 accepts the exact source with strict ES2022 checking; TypeScript transpilation + Node prints 7. SharpTS reports Expect property name after 'get'/'set' from ParseAccessorName. The same failure occurs in both interpreter/compiler test harnesses, before code generation.
This is a preexisting parser boundary, independently discovered by adding an extra private-accessor-only brand control while reviewing #3477. The unchanged earlier compiler DLL SHA256 72563E1051FECE31449F16EADD5194BD36306A6092930BF230FBE0652218ACBD reproduces the parse rejection. git diff origin/main -- src/SharpTS/Parsing is empty. Ordinary public accessors and ECMAScript private fields/methods are separate supported grammar; this issue does not claim a regression in lexical-super element transport.
All-state searches for private accessor/parser, private getter and ParseAccessorName found no focused grammar issue. Closed #2204 concerns TypeScript private accessor visibility, not #name accessor syntax; #2419 concerns accessibility ordering.
Acceptance: parse ECMAScript private getter/setter names and retain their class-owned private-name identity/brand in both engines, including getter-only and setter-only forms and duplicate/brand restrictions. Keep the syntax work separate from #3477's supported element transport repair.
Evidence: artifacts/p3-checker/private-accessor-parser.ts, private-accessor-ts.log, private-accessor-before.log, private-accessor-parser-evidence.json, and lexical-special-oracles-before-private-accessor-split.json (the private-accessor row matches TypeScript6.0.3+Node).
- Dominant language
- C#
- Stars
- 156
- Forks
- 4
- Avg merge
- 15h 1m
- Merged PRs (30d)
- 42
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nickna/SharpTS
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
priority: P2
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
bug priority: P2
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
bug priority: P2
Difficulty 5/5 Over a week Newbie friendliness 30/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NethermindEth/nethermind#15684 ·
Maintainers usually reply within 1 day
-
area/ai-assistant squad/flyt
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Altinn/altinn-studio#21798 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
arastella625/DAORework#181 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
BEagle1984/silverback#280 ·
-
bug P1
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
endercodezz/BYDLO#417 ·
Maintainers usually reply within 1 day