Skip to content

Compiler enters infinite loop when class extends itself #2201

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

Closed
romdotdog opened this issue Feb 12, 2022 · 0 comments · Fixed by #2266
Closed

Compiler enters infinite loop when class extends itself #2201

romdotdog opened this issue Feb 12, 2022 · 0 comments · Fixed by #2266
Labels

Comments

@romdotdog
Copy link
Contributor

romdotdog commented Feb 12, 2022

Code

class Foo extends Foo {
  bar(): void {}
}

Strangely if you omit the void return type like this

class Foo extends Foo {
  bar() {}
}

only the AS playground enters an infinite loop while the main branch just exits with a parse error

  ERROR TS1110: Type expected.

     bar() {}
          ^
   in test.ts(2,8)
@dcodeIO dcodeIO added the bug label Feb 16, 2022
technohippy added a commit to technohippy/assemblyscript that referenced this issue Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants