Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super class (class extends) isn't parenthesized correctly #479

Closed
NotWearingPants opened this issue Mar 3, 2021 · 0 comments · Fixed by #504
Closed

Super class (class extends) isn't parenthesized correctly #479

NotWearingPants opened this issue Mar 3, 2021 · 0 comments · Fixed by #504
Labels

Comments

@NotWearingPants
Copy link

NotWearingPants commented Mar 3, 2021

There is no parenthesis check at all in class extends ....

Using the online demo:


class A extends (a => a) {}

turns into

class A extends a => a {}

which is a syntax error.


function* f() { class A extends (yield) {} }

turns into

function* f() { class A extends yield {} }

which is a syntax error.


async function f() { class A extends (await B) {} }

turns into

async function f() { class A extends await B {} }

which is a syntax error.


class A extends (a++) {}

turns into

class A extends a++ {}

which is a syntax error.


class A extends (1+1) {}

turns into

class A extends 1+1 {}

which is a syntax error.


class A extends (-1) {}

turns into

class A extends -1 {}

which is a syntax error.

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

Successfully merging a pull request may close this issue.

2 participants