[#38] | project: compiler | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Burak | Matthias | fixed | 2003-06-16 13:24:25.0 | |
subject | import does not work | |||
code |
object testElem { import scala.xml.* ; // does not work //import scala.xml.Element ; //works def main( args:Array[String] ) = { val foo = new Element { def getName = "hallo"; def getChildren = Nil; def getAttribs = new HashMap[String,String] }; () } } |
|||
what happened | testElem.scala:7: not found: constructor Element |
|||
what expected | compile without error. writing scala.xml.* instead
of scala.xml.Element.
Matthias: This is a feature. import scala.xml.* will import the name * (which is a legal identifier in Scala). For importing all members of a scope, the form import StableId ._ has to be used. Martin: I made the compiler emit a warning for this case. |
|||
[back to overview] |