diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-05-04 14:36:45 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-05-04 14:36:45 +0000 |
commit | b38cddd20e5f5c7025f645413e8e5b309c8b893c (patch) | |
tree | ba7e62f7882f1965e459881493ffe6b6dce3a8de /test/files/run/t4461.scala | |
parent | 00f6d557ed23f18868b85bd23c790ffd5c044867 (diff) | |
download | scala-b38cddd20e5f5c7025f645413e8e5b309c8b893c.tar.gz scala-b38cddd20e5f5c7025f645413e8e5b309c8b893c.tar.bz2 scala-b38cddd20e5f5c7025f645413e8e5b309c8b893c.zip |
Fixes and closes #4461. No review.
Diffstat (limited to 'test/files/run/t4461.scala')
-rw-r--r-- | test/files/run/t4461.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/t4461.scala b/test/files/run/t4461.scala new file mode 100644 index 0000000000..d1f80a6012 --- /dev/null +++ b/test/files/run/t4461.scala @@ -0,0 +1,19 @@ +import scala.collection.mutable._ +import scala.collection.script._ + + +// #4461 +object Test { + def main(args: Array[String]) { + val buf = new ArrayBuffer[Int] with ObservableBuffer[Int] + buf.subscribe(new Subscriber[Message[Int], ObservableBuffer[Int]] { + def notify(pub: ObservableBuffer[Int], event: Message[Int]) = println(event) + }) + + buf += 1 // works + buf ++= Array(2) // works + buf ++= ArrayBuffer(3, 4) // works + buf ++= List(5) // works + buf ++= collection.immutable.Vector(6, 7) // works + } +} |