Aladdin - Scala Bugtracking
[#166] project: compiler priority: high category: bug
submitter assigned to status date submitted
Burak Michel fixed 2003-09-30 17:13:25.0
subject compilation of HashMap
code
import scala.collection.mutable.HashMap ;

object ga { 

  def main(args:Array[String]) = {
    val m:HashMap[String,String] = new HashMap[String,String];
    m.update("foo","bar");
  }
}
what happened
/tmp> java ga
Exception in thread "main" java.lang.AbstractMethodError: scala.collection.mutable.HashMap$class.entryKey(Ljava/\
lang/Object;)Ljava/lang/Object;
	at scala.collection.mutable.HashMap$class.addEntry(sources/scala/collection/mutable/HashMap.scala:65)
	at scala.collection.mutable.HashMap$class.update(sources/scala/collection/mutable/HashMap.scala:34)
	at ga$.main(testMapGa.scala:8)
	at ga.main(testMapGa.scala)
what expected compile and run without errors.
[back to overview]
Changes of this bug report
Burak  edited on  2003-09-30 17:15:01.0
seems related to bug#37
Philippe  edited on  2003-10-03 13:41:35.0

The last update of AsSeenFrom fixed the AbstractMethodError problem. The program now runs correctly with the compiler, but with this interpreter, it raises the following error:

Exception in thread "main" java.lang.ArrayStoreException
        at scala.runtime.RunTime.oarray_set(RunTime.java:589)
        at scala.collection.mutable.HashMap$class.initTable(HashMap.scala:112)
        at scala.collection.mutable.HashMap$class.(HashMap.scala:47)
        at Test.main(test.scala:6)
but this is probably another bug.