-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)package objects
Description
If I create a package object in the empty package:
object `package` {
implicit class sss(s: String) {
def d: Double = s.toDouble
}
}
then I have to import its members explicitly:
import `package`._
package x {
object X { def f = "3.14".d }
}
If the empty package is allowed to have a package object, then the workaround also bends the rule that members of the empty package cannot be imported.
Edit: obviously this is more interesting if they're importing in a named package. Also, same behavior on dotty.
Metadata
Metadata
Assignees
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)package objects