Skip to content
This repository was archived by the owner on May 19, 2018. It is now read-only.
/ babylon Public archive
This repository was archived by the owner on May 19, 2018. It is now read-only.

new.target can only be used in functions #400

@danez

Description

@danez

Input Code

new.target

Expected Behavior

Error: "new.target can only be used inside functions"

Current Behavior

parses just fine

new.target is only valid if it is inside a function function () { new.target } but not outside of functions.

flow, acorn, espree, esprima fail correctly

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions