summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-11-07 13:18:40 +0100
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-11-07 17:51:06 +0100
commitcbca4943884d23f0a588471ea68e733170d069af (patch)
tree669cebd9475e9ca19aac9f6920a69a04fde77fdf /test
parenta34be74e8f2630f1862a34e538cbe1162d279e5e (diff)
downloadscala-cbca4943884d23f0a588471ea68e733170d069af.tar.gz
scala-cbca4943884d23f0a588471ea68e733170d069af.tar.bz2
scala-cbca4943884d23f0a588471ea68e733170d069af.zip
[sammy] support repeated params
Generate correct trees to refer to repeated params using `gen.paramToArg`. Based on retronym's review feedback.
Diffstat (limited to 'test')
-rw-r--r--test/files/run/sammy_repeated.check1
-rw-r--r--test/files/run/sammy_repeated.flags1
-rw-r--r--test/files/run/sammy_repeated.scala8
3 files changed, 10 insertions, 0 deletions
diff --git a/test/files/run/sammy_repeated.check b/test/files/run/sammy_repeated.check
new file mode 100644
index 0000000000..1cff0f067c
--- /dev/null
+++ b/test/files/run/sammy_repeated.check
@@ -0,0 +1 @@
+WrappedArray(1)
diff --git a/test/files/run/sammy_repeated.flags b/test/files/run/sammy_repeated.flags
new file mode 100644
index 0000000000..e1b37447c9
--- /dev/null
+++ b/test/files/run/sammy_repeated.flags
@@ -0,0 +1 @@
+-Xexperimental \ No newline at end of file
diff --git a/test/files/run/sammy_repeated.scala b/test/files/run/sammy_repeated.scala
new file mode 100644
index 0000000000..c24dc41909
--- /dev/null
+++ b/test/files/run/sammy_repeated.scala
@@ -0,0 +1,8 @@
+trait RepeatedSink { def accept(a: Any*): Unit }
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ val f: RepeatedSink = (a) => println(a)
+ f.accept(1)
+ }
+} \ No newline at end of file