Closed
Bug 1530731
Opened 6 years ago
Closed 6 years ago
SyntaxError: fields are not currently supported when using global variables in classes javascirpt
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1499448
People
(Reporter: goranvel, Unassigned)
Details
Attachments
(1 file)
276 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
I have this code which I run in Firefox 65
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<meta charset="UTF-8">
<script>
class tClass {
a;
b;
constructor (aa, bb) {
let this.a=aa;
let this.b=bb;
}
}
</script>
</head>
<body>
<div>
test;
</div>
</body>
</html>
and run it.
Actual results:
SyntaxError: fields are not currently supported
Expected results:
"test" shows up in browser but error should not be here.d
Comment 1•6 years ago
|
||
as the error says, fields are not yet supported.
also, your constructor code is wrong that you have unnecessary let
.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•