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

RESOLVED FIXED in Firefox 68

Status

()

task
P1
normal
RESOLVED FIXED
2 months ago
2 months ago

People

(Reporter: khyperia, Assigned: khyperia)

Tracking

(Blocks 1 bug)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(2 attachments)

Assignee

Description

2 months ago
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

Comment 3

2 months ago
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

Comment 4

2 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1547467
You need to log in before you can comment on or make changes to this bug.