summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-06-23 19:04:50 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-06-23 19:22:22 +0200
commit4736897ad2a6425c64cadfe80d5e6d7751ee0fec (patch)
tree530a4a95010fe8f8d8daf509cb552fa61ce739d7 /test/files/run
parentff016002738580a7de11977c91e0061dbcf270ad (diff)
downloadscala-4736897ad2a6425c64cadfe80d5e6d7751ee0fec.tar.gz
scala-4736897ad2a6425c64cadfe80d5e6d7751ee0fec.tar.bz2
scala-4736897ad2a6425c64cadfe80d5e6d7751ee0fec.zip
SI-5966 Fix eta expansion for repeated parameters with zero arguments.
Reworks part of e33901 / SI-5610, which was inserting an <empty> tree as an argument in this case, which turns into a null in icode.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t5966.check3
-rw-r--r--test/files/run/t5966.scala9
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t5966.check b/test/files/run/t5966.check
new file mode 100644
index 0000000000..bfe8358a77
--- /dev/null
+++ b/test/files/run/t5966.check
@@ -0,0 +1,3 @@
+(o()_)("") = List()
+(o("a1")_)("") = WrappedArray(a1)
+(o("a1", "a2")_)("") = WrappedArray(a1, a2)
diff --git a/test/files/run/t5966.scala b/test/files/run/t5966.scala
new file mode 100644
index 0000000000..bbe1a6e874
--- /dev/null
+++ b/test/files/run/t5966.scala
@@ -0,0 +1,9 @@
+object o { def apply(i: AnyRef*)(j: String) = i }
+
+object Test {
+ def main(args: Array[String]) {
+ println("(o()_)(\"\") = " + (o()_)(""))
+ println("(o(\"a1\")_)(\"\") = " + (o("a1")_)(""))
+ println("(o(\"a1\", \"a2\")_)(\"\") = " + (o("a1", "a2")_)(""))
+ }
+}