Closed Bug 1288381 Opened 8 years ago Closed 8 years ago

Allow property accessors and calls after super()

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox50 --- affected
firefox52 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(2 files)

Test case:
---
class C extends Object {
    constructor() {
        super().foo;
        super()[0];
        super()();
        super()``;
    }
}
---

Expected: Does not throw a SyntaxError
Actual: Throws a SyntaxError
class A extends B { constructor() { super().foo() } } // throws "SyntaxError: missing ; before statement"

class A extends B { constructor() { super()
    .foo() } } // SyntaxError: expected expression, got '.'
Attached patch bug1288381.patchSplinter Review
Another simple frontend bug, I'll post another patch which omits whitespace only changes so it's easier to spot the changes.
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Attachment #8797160 - Flags: review?(arai.unmht)
Changes to Parser.cpp from the actual patch, but with whitespace only changes suppressed.
Comment on attachment 8797160 [details] [diff] [review]
bug1288381.patch

Review of attachment 8797160 [details] [diff] [review]:
-----------------------------------------------------------------

thanks :)
Attachment #8797160 - Flags: review?(arai.unmht) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6dd3d752338c
Allow member expressions after super() call. r=arai
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6dd3d752338c
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: