aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t2991.scala
blob: f11b082c6f6468e11284da6bd05c7f9d5d1110b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class X {
  def f(x: AnyRef) = x.toString
  def f(x: AnyRef, y: AnyRef*) = y.mkString(x.toString)
}

class Y {
  def f(x: Int) = x.toString
  def f(x: Int, y: Int*) = y.mkString(x.toString)
}

object Test {
  val x: AnyRef = "a"
  val res0 = new X
  res0.f(x)
  val res1 = new Y
  res1.f(5)
}