-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Forbid enum extending enum #5008
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
Comments
I'm guessing refchecks because we can't necessarily resolve |
skvithalani
added a commit
to skvithalani/dotty
that referenced
this issue
Aug 25, 2018
…ass cannot extend enum'
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 25, 2018
Check if we inherit from scala.Enum both directly (as a result of the desugaring) and indirectly.
Closed
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 25, 2018
@hrhino also asks about enum A ; class B extends A { val enumTag = 1 } which doesn't seem any better. |
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 26, 2018
Check if we inherit from scala.Enum both directly (as a result of the desugaring) and indirectly.
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 15, 2019
Blaisorblade
added a commit
that referenced
this issue
Jan 27, 2019
Fix #5008: forbid any class extending enums
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should forbid this code (discovered in #4961), we already forbid case classes/objects extending enum:
The text was updated successfully, but these errors were encountered: