diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t4461.check | 7 | ||||
-rw-r--r-- | test/files/run/t4461.scala | 19 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/t4461.check b/test/files/run/t4461.check new file mode 100644 index 0000000000..b05c7b5589 --- /dev/null +++ b/test/files/run/t4461.check @@ -0,0 +1,7 @@ +Include(End,1) +Include(End,2) +Include(End,3) +Include(End,4) +Include(End,5) +Include(End,6) +Include(End,7)
\ No newline at end of file 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 + } +} |