-
Notifications
You must be signed in to change notification settings - Fork 1.1k
sealed final abstract case object Foo #4936
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
Labels
Comments
I guess you meant does or shouldn't? |
Updated the description 👍 |
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 21, 2018
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 21, 2018
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 21, 2018
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 21, 2018
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 15, 2019
Fix scala#4936. - Stop using final object in our sources. - Give error for abstract and sealed objects, warning for final ones (as long as - scala/bug#11094 is open).
At least as long as scala/bug#11094 is open, I'd rather not forbid final object. |
We should just add a warning on the redundant modifier. |
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 15, 2019
Fix scala#4936. - Stop using final object in our sources. - Give error for abstract and sealed objects, warning for final ones (as long as - scala/bug#11094 is open).
@nicolasstucki Can you review #4973? |
Yes |
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 16, 2019
Fix scala#4936 in parser. - Stop using final object in our sources. - Give error for abstract and sealed objects, warning for final ones (as long as - scala/bug#11094 is open). - Address review comments.
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 16, 2019
Fix scala#4936 in parser. - Stop using final object in our sources. - Give error for abstract and sealed objects, warning for final ones (as long as - scala/bug#11094 is open). - Address review comments.
nicolasstucki
added a commit
that referenced
this issue
Jan 16, 2019
…-flags Fix #4936: Forbid (or warn on) redundant/illegal object flags
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 16, 2019
This follows again the original strategy in 1ecf67b. This check is at the latest possible point: a few lines later, `RetainedModuleValFlags` excludes `Abstract` and `Sealed` while `ModuleValCreationFlags` adds `Final`.
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 17, 2019
This follows again the original strategy in 1ecf67b. This check is at the latest possible point: a few lines later, `RetainedModuleValFlags` excludes `Abstract` and `Sealed` while `ModuleValCreationFlags` adds `Final`.
Blaisorblade
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 19, 2019
This follows again the original strategy in 1ecf67b. This check is at the latest possible point: a few lines later, `RetainedModuleValFlags` excludes `Abstract` and `Sealed` while `ModuleValCreationFlags` adds `Final`. Unlike in Parsers, at this point in Desugar we get Synthetic objects. We also get objects with flags but without corresponding mods; they might all be synthetic, but let's harden flagSpan anyway.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Lots of modifiers are allowed on
object
s, but they do not seem to have any semantics.In fact, you can have a
But sadly
doesn't compile, haha.
Perhaps those modifiers should be reported as errors?
The text was updated successfully, but these errors were encountered: