Aladdin - Scala Bugtracking
[#485] project: compiler priority: low category: bug
submitter assigned to status date submitted
Burak _ _ 2005-11-12 15:18:49.0
subject synchronized maps in collection.mutable don't work
code
import scala.collection.mutable.{ Map, HashMap, SynchronizedMap };

class Foo[A,B] extends HashMap[A, B] with SynchronizedMap[A,B];
what happened
hash.scala:3: method clone in trait SynchronizedMap of type ()scala.collection.mutable.Map[A,B]
 cannot override method clone in class HashMap of type ()scala.collection.mutable.HashMap[A,B]
class Foo[A,B] extends HashMap[A, B] with SynchronizedMap[A,B];
                                          ^
hash.scala:3: class Foo needs to be abstract, since method get in trait SynchronizedMap is marked `abstract' and\
 `override' and overrides an incomplete superclass member in scala.collection.mutable.HashMap[A,B]
class Foo[A,B] extends HashMap[A, B] with SynchronizedMap[A,B];
      ^
two errors found
what expected no error
[back to overview]
Changes of this bug report