```scala
trait T[@specialized(Int) X] {
  def foo[@specialized(Long) B, @specialized(Long, Int) A](b: B, a: A) = { println("T::foo"); b}
}

trait U extends T[Int] {
  override def foo[@specialized(Long) A, @specialized(Long, Int) B](a: A, b: B) = {println("U::foo"); a}
}

object Test extends App {
  new U {}.foo(0L, 0)
  (new U {}: T[Int]).foo(0L, 0) // !!! "T::foo"
}

```