Sean edited on 2006-05-15 17:45:09.0
|
Even worse than I thought. You don't have to import lampion.scala._ for things to blow up, just being in the lampion package is enough for an auto-import of lampion.scala (but not its members) to occur!
So Scala will always favor xxx.yyy over yyy if we are in some sub-package xxx, yikes!
|
Martin edited on 2006-05-17 10:57:51.0
|
First, implicitly added references such as scala.ScalaObject can no longer be hijacked by package statements. Second, there is now a new package name _root_, from which absolute package names can be constructed. E.g.
package lampion.scala
import _root_.scala.collection.mutable._
|
Burak edited on 2006-06-02 15:48:16.0
|
I just made the SymbolicXMLBuilder use the _root_ so that one can also use XML literals in a scope that rebinds the "scala" name. The (not minimal) example is here
object markupstuff {
object in {
object scala {
val XML = _root_.scala.xml.XML;
val foo = <a><b/></a>
}
}
}
|