Open Bug 1564825 Opened 6 years ago Updated 11 months ago

Misleading Syntax Error when re-declaring an ES6 class

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

REOPENED
Tracking Status
firefox70 --- affected

People

(Reporter: nchevobbe, Unassigned)

References

(Blocks 1 open bug)

Details

Steps to reproduce

  1. Go to data:text/html,<meta charset=utf8><script>class A{}</script><script>class A{}</script>
  2. Open the webconsole

Expected results

I see the following message:

SyntaxError: redeclaration of class A

Actual results

SyntaxError: redeclaration of let A


Opening the following page does give me the expected error message though: data:text/html,<meta charset=utf8><script>class A{};class A{}</script>

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE

Reopening this instead of Bug 1428672, which the original bug was resolved.

Future attempts to solve this one should nevertheless reference that bug, as there's valuable information in there.

Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Severity: normal → S4
Type: task → defect
Priority: -- → P2
Severity: S4 → N/A
Priority: P2 → P3
Type: defect → enhancement
You need to log in before you can comment on or make changes to this bug.