Open
Bug 1844640
Opened 1 year ago
Updated 1 year ago
Improve error location for mismatched getter/setter private fields.
Categories
(Core :: JavaScript Engine, enhancement, P5)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: mgaudet, Unassigned)
References
(Blocks 1 open bug)
Details
The current error message appears like so:
typein:3:15 SyntaxError: getter and setter for private name #x should either be both static or non static:
typein:3:15 get #x() { }
typein:3:15 ...............^Would it be better to point the arrow at the beginning of the line, like this?
typein:3:15 get #x() { }
typein:3:15 ....^
As to the how, I said this:
To your question, we'd want to do it in a followup bug, but how I imagine having to do it would be to go back and grab the token position before the call to propertyOrMethodName and pass that through noteDeclaredPrivateName and use that token position as the error position.
Updated•1 year ago
|
Severity: -- → N/A
Priority: -- → P5
You need to log in
before you can comment on or make changes to this bug.
Description
•