Closed
Bug 1552022
Opened 5 years ago
Closed 5 years ago
Synthesized constructors for derived classes ignore all arguments (with fields and no constructor() method)
Categories
(Core :: JavaScript Engine, task, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla68
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: jorendorff, Assigned: khyperia)
References
Details
Attachments
(1 file)
Ashley noticed this.
class B {
constructor(x) {
console.log(x);
}
}
class C extends B {
}
new C("C"); // prints "C"
class D extends B {
asdf = 2;
}
new D("D"); // prints undefined :'(
The synthesized constructor should do super(...args)
, but currently it just does super()
.
Reporter | ||
Updated•5 years ago
|
Priority: -- → P1
Reporter | ||
Updated•5 years ago
|
Summary: Arguments are ignored in derived-class synthesized constructors → Synthesized constructors for derived classes ignore all arguments (with fields and no constructor() method)
Assignee | ||
Comment 1•5 years ago
|
||
Pushed by ahauck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3944c733e417
Pass through arguments in synthesized constructors for derived classes. r=jorendorff
Comment 3•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox68:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Updated•5 years ago
|
Assignee: nobody → khyperia
You need to log in
before you can comment on or make changes to this bug.
Description
•