aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/named-params.scala
blob: 51041078d3f4e70a5e113a807ac513ed4106a5ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package namedparams

abstract class C[type Elem, type Value](val elem: Elem) {
  def toVal: Elem = ???
}



object Test {
  val c = new C[String, String]("A") {
    override def toVal = elem
  }
  val x: c.Elem = c.elem

  val c2: C { type Elem = String } = c
  val x2: c2.Elem = c2.elem
}