aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t0432.scala
blob: 10f64e31da95d95d66fcf634d80ade3f91517be6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import scala.language.reflectiveCalls

object Test {
  type valueType = { def value: this.type }

  class StringValue(x: String) {
    def value: this.type = this
  }

  def m(x: valueType) = x.value

  val s = new StringValue("hei")

  def main(args: Array[String]): Unit = {
    m(s)
  }
}