Closed Bug 1542448 Opened 5 years ago Closed 5 years ago

Calling super in a computed field key accesses the wrong .initializers

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: khyperia, Assigned: khyperia)

References

Details

Attachments

(2 files)

class B {
}
class C extends B {
  field = 2;
  constructor() {
    class D {
      [super()];
    }
  }
}

that super() should call C's base (B), but it incorrectly grabs D's .initializers.

I don't think this is in test262, so we should consider adding it.

Priority: -- → P1
Pushed by ahauck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/83ab9bf5138e
Always emit scopes for classes. r=jorendorff
https://hg.mozilla.org/integration/autoland/rev/d11fc84ce16f
Copy .initializers to .localInitializers for derived classes. r=jorendorff
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: