This page is no longer maintained — Please continue to the home page at www.scala-lang.org

with SynchronizedSet

2 replies
anli
Joined: 2008-08-19,
User offline. Last seen 1 day 1 hour ago.

What have I missed?

//-------------------

# scala
Welcome to Scala version 2.8.0.r18375-b20090722041554 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_14).
Type in expressions to have them evaluated.
Type :help for more information.

scala> val m = new scala.collection.mutable.HashSet[String] with scala.collection.mutable.SynchronizedSet[String]
:4: error: overriding method clone in class HashSet of type ()scala.collection.mutable.HashSet[String];
method clone in trait SynchronizedSet of type ()scala.collection.mutable.Set[String] has incompatible type
val m = new scala.collection.mutable.HashSet[String] with scala.collection.mutable.SynchronizedSet[String]
^

scala>

Jorge Ortiz
Joined: 2008-12-16,
User offline. Last seen 29 weeks 4 days ago.
Re: with SynchronizedSet
Looks like a bug.

On Wed, Jul 22, 2009 at 2:13 AM, Andrew Gaydenko <a@gaydenko.com> wrote:
What have I missed?

//-------------------

 # scala
Welcome to Scala version 2.8.0.r18375-b20090722041554 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_14).
Type in expressions to have them evaluated.
Type :help for more information.

scala> val m = new scala.collection.mutable.HashSet[String] with scala.collection.mutable.SynchronizedSet[String]
<console>:4: error: overriding method clone in class HashSet of type ()scala.collection.mutable.HashSet[String];
 method clone in trait SynchronizedSet of type ()scala.collection.mutable.Set[String] has incompatible type
      val m = new scala.collection.mutable.HashSet[String] with scala.collection.mutable.SynchronizedSet[String]
                  ^

scala>


anli
Joined: 2008-08-19,
User offline. Last seen 1 day 1 hour ago.
Re: with SynchronizedSet

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland