Skip to content

Class method with name get throws incorrect "invalid property name" exception #261

@richarddavison

Description

@richarddavison

When using arrow functions to define methods on a class, QJS throws exception:

SyntaxError: invalid property name
    at ./test.js:2:6

class TestClass {
  get = () => console.log("get");
}

new TestClass().get();

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions