Skip to content

minifier: new.target.url getter sideeffect is removed #19467

@sapphi-red

Description

@sapphi-red
class A {
  constructor() {
    new.target.url;
  }
}

class B extends A {
  static get url() {
    console.log('url!');
  }

  constructor() {
    super();
  }
}

new B();

playground

Found while checking #19308. It was pointed out by Copilot (#19308 (comment)).

Metadata

Metadata

Assignees

Labels

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions