Skip to content

Unexpected ASI after static in classΒ #43836

Closed
@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