Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

static field initializer as an arrow function containing new.target is not allowed #758

Closed
gsathya opened this issue Oct 13, 2017 · 0 comments · Fixed by #759
Closed

static field initializer as an arrow function containing new.target is not allowed #758

gsathya opened this issue Oct 13, 2017 · 0 comments · Fixed by #759

Comments

@gsathya
Copy link
Member

gsathya commented Oct 13, 2017

Input Code

class X {
  static c = () => new.target;
}

Babylon/Babel Configuration

stage2, stage3

Expected Behavior

No error

Current Behavior

repl: new.target can only be used in functions (2:23)
  1 | class X {
> 2 |   static c = () => new.target;
    |                        ^
  3 | }

Your Environment

REPL

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants