Skip to content

Incorrect parse on static property followed by method #38283

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
// @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.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions