From c1d388fb3a9f826d09775afdb4610bf7dd357cad Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 22 Aug 2015 20:15:57 +0200 Subject: 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. --- tests/run/i768.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/run/i768.scala (limited to 'tests') 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)") +} + + -- cgit v1.2.3