summaryrefslogblamecommitdiff
path: root/test/neg/bug145.scala
blob: 5845393ac81870443687894b18af8c1fdc3bbe7b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                             
 
class B[T] {
  def foo(x: T): Int = 1;
}
trait J[T] {
  def foo(x: T): Int;
}
trait I[T] extends B[T] with J[T] {
  abstract override def foo(x: T): Int = super[J].foo(x) + 1;
}
class C extends B[Int] {
  override def foo(x: Int): Int = x;
}
class D extends C with I[Int];
object T with Executable {
  System.out.println((new D).foo(3));
}