Skip to content

new.target is not allowed in class field initializer #6243

@gsathya

Description

@gsathya

Choose one: is this a bug report or feature request?

bug

Input Code

class F {
  x = new.target;
}

Babel Configuration (.babelrc, package.json, cli command)

stage3, stage2

Expected Behavior

no error

Current Behavior

Error

Your Environment

REPL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Spec: Class FieldsoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions