aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t2991.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-01-12 12:03:43 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-19 14:00:01 +0100
commit70e27f8a6f7943e8913a194fd69a4e73cc6fde1b (patch)
treee3d9375b3faee990d9fd19322289b9b024ee0947 /tests/pos/t2991.scala
parentdbf04a67bbd06c5beebb958d0012ae300a20d0d1 (diff)
downloaddotty-70e27f8a6f7943e8913a194fd69a4e73cc6fde1b.tar.gz
dotty-70e27f8a6f7943e8913a194fd69a4e73cc6fde1b.tar.bz2
dotty-70e27f8a6f7943e8913a194fd69a4e73cc6fde1b.zip
More named param tests
Also, add an unrelated test file to pos.
Diffstat (limited to 'tests/pos/t2991.scala')
-rw-r--r--tests/pos/t2991.scala17
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)
+}