Skip to content

Infinite loop in parser when enum followed by invalid code #2494

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
smarter opened this issue May 21, 2017 · 0 comments
Closed

Infinite loop in parser when enum followed by invalid code #2494

smarter opened this issue May 21, 2017 · 0 comments

Comments

@smarter
Copy link
Member

smarter commented May 21, 2017

If you try running the following:

enum 
object

You'll get an infinite loop around enumCaseStats in the parser, this is very similar to the issue that #2270 fixed for the REPL.

I'm not sure what the correct fix is here, but I'll note that other while loops in the parser check an exitOnError flag, I assume that this is to avoid this sort of things.

odersky added a commit to dotty-staging/dotty that referenced this issue May 23, 2017
smarter added a commit that referenced this issue May 23, 2017
Fix #2494: avoid infinite loop in parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant