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

Incorrect parse on static property followed by method #38283

Closed
DanielRosenwasser opened this issue May 1, 2020 · 0 comments · Fixed by #41127
Closed

Incorrect parse on static property followed by method #38283

DanielRosenwasser opened this issue May 1, 2020 · 0 comments · Fixed by #41127
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented May 1, 2020

// @target: esnext
// @noImplicitAny: false

class C {
    static static
    foo() {}
}

Here, ASI needs to take effect and the parse should be a class with two members: a static property named "static", and an instance method named "foo".

Expected

No errors. The file is parsed as

class C {
    static static;
    foo() {}
}

Actual

'static' modifier already seen.
@DanielRosenwasser DanielRosenwasser changed the title Incorrect parse on static property Incorrect parse on static property followed by method May 1, 2020
@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label May 1, 2020
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.0 milestone May 4, 2020
@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Aug 31, 2020
@typescript-bot typescript-bot added the Fix Available A PR has been opened for this issue label Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue Rescheduled This issue was previously scheduled to an earlier milestone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants