Skip to content

Unexpected ASI after static in class #43836

@nicolo-ribaudo

Description

@nicolo-ribaudo

Bug Report

🔎 Search Terms

static ASI newline

Related: #38283

🕗 Version & Regression Information

It fails 4.2.3 and nightly. It works in 4.0.5. I think this regression has been introduced by #41127.

⏯ Playground Link

Playground link with relevant code

💻 Code

class A {
  static
  static
}

🙁 Actual behavior

It is parsed as two instance fields named static.

🙂 Expected behavior

It should be parsed as a static field named static.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issueHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosRescheduledThis 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