summaryrefslogtreecommitdiff
path: root/test/files/pos/t2660.scala
blob: b1908b201ba908e2fb051d3253e5f6082045a6ac (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
package hoho

class G

class H extends G

class A[T](x: T) {

  def this(y: G, z: T) = {
    this(z)
    print(1)
  }

  def this(z: H, h: T) = {
    this(h)
    print(2)
  }
}

object T {
  def main(args: Array[String]) {
    implicit def g2h(g: G): H = new H
    new A(new H, 23)
  }
}