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

Linebreaks after 'get' or 'set' in class bodies are not parsed correctly (T7533) #157

@motiz88

Description

@motiz88

Issue originally made by @bakkot (as T7533 and later babel/babel#4432)

Input code

class A {
  get
    x(){}
}

Description

This code gives a parse error without the class-properties-transform plugin, and is parsed as a class containing a single method x with it. Neither is correct; it's valid syntax for a class with a getter (not method) for 'x'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions