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
"extends AnyRef" should not induce cyclic reference errors #6535
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6535?orig=1 |
@retronym said (edited on Dec 3, 2012 11:42:07 PM UTC): object As {
import Bs.B._
object A
extends scala.Immutable // needed for the cycle; scala.{Serializable, Clonable} also work.
// replacing with a locally defined closs doesn't cycle.
}
object Bs {
import As.A._
object B
extends AnyRef // or scala.Immutable / whatever...
}
|
@paulp said: |
@retronym said: I believe the cycle was valid: although adding I added a neg test case to show the situation, and also rearranged the imports to avoid flying so close to the sun. |
@paulp said: Would you agree that it's a bug that it fails even if I fully qualify everything with _root_,
e.g. _root_.scala.AnyRef? We have already established in other tickets that _root_ is barely
acknowledged internally; you can define a package named _root_, etc. But if _root_ were
handled like the reserved word that it should be, then a parent _root_.scala.AnyRef should
not require any enhanced interrogation. |
@retronym said: While we should tighten that up, I don't think we should bend over backwards for this cycle -- it's easy enough to move the imports. |
@paulp said: |
@adriaanm said: |
30 errors is a lot of errors for something which should be a no-op. It's supposed to mean "extends AnyRef" already!
The text was updated successfully, but these errors were encountered: