Closed
Bug 1778607
Opened 2 years ago
Closed 2 years ago
Syntax Error "reference to undeclared private field or method" showing incorrectly
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1770609
People
(Reporter: joebodletv247, Unassigned)
Details
Attachments
(1 file)
(deleted),
application/x-javascript
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
Steps to reproduce:
Create script with 2 simple classes:
class A
{
#MethodA () {}
}
class B
{
MethodA (){}
MethodB (){
this.#MethodA ();
}
}
Run in browser
Actual results:
Uncaught SyntaxError: reference to undeclared private field or method #MethodA app2.js:3:4
Take note of the line, 3
This is the incorrect line to show the error for.
Expected results:
The error is actually on line 11, trying to call private method "#MethodA" which doesn't exist due to a typo on line 8 (missing #).
Line 3 is valid, line 11 is invalid.
Updated•2 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Comment 1•2 years ago
|
||
I believe this is a dupe of Bug 1770609, and is fixed as of Firefox 102; if you could confirm with the latest release.
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•