Closed Bug 1908521 Opened 2 years ago Closed 2 years ago

Suspected dead code in parser

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

Details

Attachments

(1 file)

While reviewing a patch I realized that I couldn't figure out how we could ever error in these lines

We definitely have no test coverage of this.

Can we remove these checks, or perhaps convert this to an assert?

I think it's this case? class X { x: 1 }

Ah! Perfect. Thanks. I'll add a test case for this -- it's weird we don't have any coverage of this!

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX

(Why don't I just use this bug to land test case..)

Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---

Analyzing if there's any other cases which would be interesting:

  1. CoverInitializedName isn't supposed to be generated inside a class, so can't test for that.
  2. Shorthand also cannot be created inside a class.
  3. Field and FieldWithAccessor is handled in the block prior to this one.

That leaves Constructor and DerivedConstructor, which I think are handled elsewhere.

Assignee: nobody → mgaudet
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/76792eb1472f Add coverage for previously missed syntax error r=arai
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: