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

Unexpected ASI after static in class #43836

Closed
nicolo-ribaudo opened this issue Apr 26, 2021 · 3 comments Β· Fixed by #44813
Closed

Unexpected ASI after static in class #43836

nicolo-ribaudo opened this issue Apr 26, 2021 · 3 comments Β· Fixed by #44813
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue Has Repro This issue has compiler-backed repros: https://aka.ms/ts-repros Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@nicolo-ribaudo
Copy link

nicolo-ribaudo commented Apr 26, 2021

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.

@RyanCavanaugh
Copy link
Member

The phrasing in expected/actual is a bit jumbled, so to be clear, the correct behavior is to parse this as class A { static static; }

@nicolo-ribaudo
Copy link
Author

The phrasing in expected/actual is a bit jumbled

Oh I just got them reversed, I updated the description.

@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Jun 18, 2021
@typescript-bot typescript-bot added the Has Repro This issue has compiler-backed repros: https://aka.ms/ts-repros label Jun 29, 2021
@typescript-bot typescript-bot added Fix Available A PR has been opened for this issue labels Jun 29, 2021
@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 30, 2021

πŸ‘‹ Hi, I'm the Repro bot. I can help narrow down and track compiler bugs across releases! This comment reflects the current state of the repro in this issue running against the nightly TypeScript.


Issue body code block by @nicolo-ribaudo

❌ Failed: -

  • Member 'static' implicitly has an 'any' type.
  • Duplicate identifier 'static'.

Historical Information

Issue body code block by @nicolo-ribaudo

Version Reproduction Outputs
4.2.2, 4.3.2, Nightly

❌ Failed: -

  • Member 'static' implicitly has an 'any' type.
  • Duplicate identifier 'static'.

3.9.2, 4.0.2, 4.1.2

❌ Failed: -

  • Member 'static' implicitly has an 'any' type.

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 Has Repro This issue has compiler-backed repros: https://aka.ms/ts-repros Rescheduled This issue was previously scheduled to an earlier milestone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants