summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-29 18:00:57 -0700
committerPaul Phillips <paulp@improving.org>2013-01-30 03:50:33 -0800
commite156cd13a37048b6ea822fdc8caaee40bb6a70a4 (patch)
treec4d64f0119aa834c3b24d72a70c0786ee668db00 /test/files/pos
parentf3f1e5060efe45eb01040f8332506c8c1dd26cfc (diff)
downloadscala-e156cd13a37048b6ea822fdc8caaee40bb6a70a4.tar.gz
scala-e156cd13a37048b6ea822fdc8caaee40bb6a70a4.tar.bz2
scala-e156cd13a37048b6ea822fdc8caaee40bb6a70a4.zip
SI-5859, inapplicable varargs.
[backport] And other polishing related to varargs handling.
Diffstat (limited to 'test/files/pos')
-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(): _*)
+}