From cbca4943884d23f0a588471ea68e733170d069af Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Fri, 7 Nov 2014 13:18:40 +0100 Subject: [sammy] support repeated params Generate correct trees to refer to repeated params using `gen.paramToArg`. Based on retronym's review feedback. --- test/files/run/sammy_repeated.check | 1 + test/files/run/sammy_repeated.flags | 1 + test/files/run/sammy_repeated.scala | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 test/files/run/sammy_repeated.check create mode 100644 test/files/run/sammy_repeated.flags create mode 100644 test/files/run/sammy_repeated.scala (limited to 'test/files/run') 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 -- cgit v1.2.3