-
Notifications
You must be signed in to change notification settings - Fork 21
Compilation error with parameterised case class in a non-root package named 'scala' #430
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
Imported From: https://issues.scala-lang.org/browse/SI-430?orig=1 |
@richdougherty said: // Compiles
package a {
case class A[T]
}
// Compiles
package b.scala {
class B[T]
}
// Doesn't compile: type Nothing is not a member of c.scala
package c.scala {
case class C[T]
}
// Doesn't compile: type Nothing is not a member of d.scala
package d.scala.d {
case class D[T]
}
// Doesn't compile: type Any is not a member of e.scala
package e.scala {
case class E[T >: Nothing]
}
// Compiles
package f.scala {
case class F[T >: Nothing <: Any]
} |
@richdougherty said: |
Michael (michid) said: // Doesn't compile: type <byname> is not a member of package h.scala
package h.scala {
case class H(s: String)(t: =>String)
} |
@odersky said: |
@paulp said: Barring an unlikely change in package resolution semantics I'd strongly recommend against using "scala" (or "java") as a package segment name. |
Attempting to compile the following file:
gives this error:
Also occurs if the case class is in package a.b and package a.b.scala is defined.
Tested against rev 13855
The text was updated successfully, but these errors were encountered: