summaryrefslogtreecommitdiff
path: root/test/files/pos/t5859.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-29 18:00:57 -0700
committerPaul Phillips <paulp@improving.org>2012-09-29 18:05:11 -0700
commit8886d22cd64e2bf861079873751455aeef9ee7a1 (patch)
treee0287151d61f392088fc93ed739df3b9aa7b9ccd /test/files/pos/t5859.scala
parent2e14b0771569b4fb6cd0273e1480f69c18743832 (diff)
downloadscala-8886d22cd64e2bf861079873751455aeef9ee7a1.tar.gz
scala-8886d22cd64e2bf861079873751455aeef9ee7a1.tar.bz2
scala-8886d22cd64e2bf861079873751455aeef9ee7a1.zip
Fix for SI-5859, inapplicable varargs.
And other polishing related to varargs handling.
Diffstat (limited to 'test/files/pos/t5859.scala')
-rw-r--r--test/files/pos/t5859.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/t5859.scala b/test/files/pos/t5859.scala
new file mode 100644
index 0000000000..2a31e68ee5
--- /dev/null
+++ b/test/files/pos/t5859.scala
@@ -0,0 +1,15 @@
+
+class A {
+ def f(xs: List[Int], ys: AnyRef*) = ()
+ def f(xs: AnyRef*) = ()
+
+ f()
+ f(List[AnyRef](): _*)
+ f(List(): _*)
+ f(Nil: _*)
+ f(Array(): _*)
+ f(Array[AnyRef](): _*)
+ f(List(1))
+ f(List(1), Nil: _*)
+ f(List(1), Array(): _*)
+}