diff options
Diffstat (limited to 'tests/pos/t2991.scala')
-rw-r--r-- | tests/pos/t2991.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/t2991.scala b/tests/pos/t2991.scala new file mode 100644 index 000000000..f11b082c6 --- /dev/null +++ b/tests/pos/t2991.scala @@ -0,0 +1,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) +} |