aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/illegal-depmeth.scala
blob: e4d771a078f01c9b32158002573bf0f92a4a4081 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
object Test {

  class C { type T }

  def f(x: C, y: x.T): x.T = y // ok

  def g(y: x.T, x: C): x.T = y // error

  def h(x: x.T) = ??? // error

  def g(x: => C): x.T = ???  // error: x is not stable

}