aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i583a.scala
blob: 7a7b1f848afe9cd9f816b20c06eb40681ca102f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
object Test {

  class C {
    type T
    val f: T = ???
    def foo(x: T): T = x
  }

  var x = new C
  val y = x.foo(???)

}
object Test1 {

  class Box[B](x: B)

  class C {
    type T
    val box: Box[T] = ???
    def f(x: T): T = ???
    def x: T = ???
  }

  def c: C = new C

  val b = c.box

  val f = c.f _

}