aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/i1240b.scala
blob: 6987dbc96d06327e8ac6440d37adea7afc41b3a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// yet another variant, testing super accessors

trait T {
  def foo[B](x: C[B]): C[B]
}
abstract class A extends T {
  type C[X]
  def foo[B](x: C[B]): C[B]       = {println("A.C"); x}
  def foo[B](x: List[B]): List[B] = {println("A.List"); x}
}
trait U extends T {
  def foo[B](x: C[B]): C[B] = super.foo[B](x)
}
object Test extends A with U {
  type C[X] = List[X]
  def main(args: Array[String]) = foo(List(""))
}