From a6ba2de0e5e81031cf3f3adc7a1db318f53782eb Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Thu, 11 Jul 2019 10:53:20 +0100 Subject: [PATCH] Fix varargs compilation --- .../src/main/scala/play/twirl/compiler/TwirlCompiler.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/src/main/scala/play/twirl/compiler/TwirlCompiler.scala b/compiler/src/main/scala/play/twirl/compiler/TwirlCompiler.scala index 9be339d4..559492d5 100644 --- a/compiler/src/main/scala/play/twirl/compiler/TwirlCompiler.scala +++ b/compiler/src/main/scala/play/twirl/compiler/TwirlCompiler.scala @@ -438,7 +438,7 @@ package """ :+ packageName :+ """ }.mkString(",") + ")", returnType, params.map(group => "(" + group.map { p => - p.name.toString + Option(p.tpt.toString).filter(_.startsWith("_root_.scala.")).map(_ => ":_*").getOrElse("") + p.name.toString + Option(p.tpt.toString).filter(_.startsWith("_root_.scala.")).map(_ => ".toIndexedSeq:_*").getOrElse("") }.mkString(",") + ")").mkString) val templateType = "_root_.play.twirl.api.Template%s[%s%s]".format( @@ -453,7 +453,7 @@ package """ :+ packageName :+ """ functionType, params.map(group => "(" + group.map(_.name.toString).mkString(",") + ")").mkString(" => "), params.map(group => "(" + group.map { p => - p.name.toString + Option(p.tpt.toString).filter(_.startsWith("_root_.scala.")).map(_ => ":_*").getOrElse("") + p.name.toString + Option(p.tpt.toString).filter(_.startsWith("_root_.scala.")).map(_ => ".toIndexedSeq:_*").getOrElse("") }.mkString(",") + ")").mkString) (renderCall, f, templateType)