aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/param-depmeth.scala
blob: 2e887d181e1447ccdf53c33d4df653b993065fd9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
object Test {

  class C { type T }

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

  val c = new C { type T = String }
  val c2 = c

  f(c, "abc")
  f(new C{ type T = String}, "abc")

  val d: (C{ type T = String}) # T = "abc"

}