Skip to content

Fix #5034: Add error on lazy enum #6674

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
wants to merge 1 commit into from

Conversation

machadoit
Copy link

Prevents the compiler from crashing, and returns error instead.

1 |lazy enum Color {case Blue}
  |          ^
  |          modifier lazy is not allowed for enums

I based my solution on work made at #5525 and @odersky concerns regarding the checking for it at checkWellformed.

Prevents the compiler from crashing, and returns error instead
Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Have an awesome day! ☀️

@allanrenucci
Copy link
Contributor

Hi @machadoit! Thanks for the contribution!

Can you do a more general fix that covers all the invalid modifiers. You can use the test cases in #5525.

@odersky
Copy link
Contributor

odersky commented Dec 12, 2019

Closing awaiting a more general solution.

@odersky odersky closed this Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants