aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t2503.scala
blob: d0983f2ca20e8ef8a1de3adca0417b098eddaf8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import scala.collection.mutable._

trait SB[A] extends Buffer[A] {

  import collection.Traversable

  abstract override def insertAll(n: Int, iter: Traversable[A]): Unit = synchronized {
     super.insertAll(n, iter)
  }

  abstract override def update(n: Int, newelem: A): Unit = synchronized {
    super.update(n, newelem)
  }
}

object Test extends dotty.runtime.LegacyApp {
  new ArrayBuffer[Int] with SB[Int]
}