Implement computed field names

RESOLVED FIXED in Firefox 68

Status

()

enhancement
P1
normal
RESOLVED FIXED
4 months ago
24 days ago

People

(Reporter: khyperia, Assigned: khyperia)

Tracking

(Regressed 1 bug)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

Currently, computed field names are not supported. Let's fix that.

class C {
    ["x"] = 2;
}

Also, implement some easier, half-related other cases, like:

class C {
    2 = 2;
    0b01 = 2;
    "hello" = 2;
}

Also, fix a related bug: we currently don't emit an initializer for this

class C {
    x;
}

which is incorrect, and especially apparent when there's a computed field with side effect as the field-without-an-initializer.

Pushed by ahauck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1b8c42577e24
Implement computed field names. r=jorendorff
Pushed by ahauck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d96f98f974e0
Implement computed field names. r=jorendorff

Clearing NI - the build issue was super easy, the assertion failure less so. Pushed updated version with both fixed.

Flags: needinfo?(khyperia)
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1550628
Regressions: 1562298
You need to log in before you can comment on or make changes to this bug.