-
Notifications
You must be signed in to change notification settings - Fork 123
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
Changing abstract class to trait causes "invalid superClass" #598
Comments
Can you reproduce in a scripted test and submit a PR with the test marked as pending? |
@adriaanm @lrytz This looks like a compiler bug in genbcode. I cannot not reproduce the issue, but Zinc is not at fault here since the error happens in the first compilation of the modified sources (not in subsequent versions where the zinc analysis is performed). Do you have any idea of what could be going on here? Looks related to the handling of package objects. |
Zinc is assuming that compiling the modified sources by themselves should always work, but it looks like this assumption is broken when files refer to each other, I've created a repo to illustrate this and reproduce the bug: https://github.com/smarter/trait-class-bug/commits/master Because Zinc knows that A.scala refers to symbols in B.scala, and B.scala refers to symbols in A.scala, it should never attempt to compile one of those without the other, even for the first compilation of modified sources. |
Using sbt 1.2.3, Scala 2.12.6
A clean fixes the compilation.
The text was updated successfully, but these errors were encountered: