diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-11-07 13:18:40 +0100 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-11-07 17:51:06 +0100 |
commit | cbca4943884d23f0a588471ea68e733170d069af (patch) | |
tree | 669cebd9475e9ca19aac9f6920a69a04fde77fdf /test/files | |
parent | a34be74e8f2630f1862a34e538cbe1162d279e5e (diff) | |
download | scala-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/files')
-rw-r--r-- | test/files/run/sammy_repeated.check | 1 | ||||
-rw-r--r-- | test/files/run/sammy_repeated.flags | 1 | ||||
-rw-r--r-- | test/files/run/sammy_repeated.scala | 8 |
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 |