aboutsummaryrefslogtreecommitdiff
path: root/tests/run/i768.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-08-22 20:15:57 +0200
committerMartin Odersky <odersky@gmail.com>2015-08-22 20:16:36 +0200
commitc1d388fb3a9f826d09775afdb4610bf7dd357cad (patch)
tree4c9b46f1ff7d095448b7879117357681d7aca08a /tests/run/i768.scala
parentde9877f53ef4e0c94968475788dd2c9e120c6e8d (diff)
downloaddotty-c1d388fb3a9f826d09775afdb4610bf7dd357cad.tar.gz
dotty-c1d388fb3a9f826d09775afdb4610bf7dd357cad.tar.bz2
dotty-c1d388fb3a9f826d09775afdb4610bf7dd357cad.zip
Refine refOfDef top handle repeated parameters
refOfDef is used in desugaring case classes, specifically the definition of an apply method. Here it is necessary to pass a vararg argument (x: _*) if the case class parameter is repeated. This functionality is now added to `refOfDef`. I verified that the other uses of `refOfDef` are compatible with this change. Fixes #768.
Diffstat (limited to 'tests/run/i768.scala')
-rw-r--r--tests/run/i768.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run/i768.scala b/tests/run/i768.scala
new file mode 100644
index 000000000..0697b476b
--- /dev/null
+++ b/tests/run/i768.scala
@@ -0,0 +1,10 @@
+case class A(a: String*){
+ val s = a.toString
+}
+
+object Test {
+ def main(args: Array[String]) =
+ assert(A("a", "bc").s == "WrappedArray(a, bc)")
+}
+
+