aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/sammy_single.scala
blob: c64e9c2b0812b70e911e8b16f50531d58cd2a8f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
// test that dependent types work
// TODO: def apply(x: String): x.type does NOT work yet
object Test {
  val s: String = ""

  trait T { def apply(x: s.type): s.type }

  val preservedResult: s.type = ((x => x): T)(s)
}