aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-08-22 22:58:18 +0200
committerMartin Odersky <odersky@gmail.com>2015-08-22 22:58:18 +0200
commitbc5f076450c71661e0edeacb54391454658e3ace (patch)
tree8a87c855f13eacd0d2d53d77f006b307102bead1 /src/dotty/tools/dotc/typer/Typer.scala
parent22c42dd5f5333285f1898b25cf322a1ce6bd7a0c (diff)
downloaddotty-bc5f076450c71661e0edeacb54391454658e3ace.tar.gz
dotty-bc5f076450c71661e0edeacb54391454658e3ace.tar.bz2
dotty-bc5f076450c71661e0edeacb54391454658e3ace.zip
Avoid T* in closure parameter ValDef
Map a T* via underlyingIFRepeated to a Seq[T] in the parameter ValDef of a closure. Without this change, fun/sammy_repeated.scala fails to YCheck under the new test introduced in the last commit.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 33ec156a1..dcf4ccc6c 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -577,7 +577,9 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
val inferredParams: List[untpd.ValDef] =
for ((param, i) <- params.zipWithIndex) yield
if (!param.tpt.isEmpty) param
- else cpy.ValDef(param)(tpt = untpd.TypeTree(inferredParamType(param, protoFormal(i))))
+ else cpy.ValDef(param)(
+ tpt = untpd.TypeTree(
+ inferredParamType(param, protoFormal(i)).underlyingIfRepeated(isJava = false)))
// Define result type of closure as the expected type, thereby pushing
// down any implicit searches. We do this even if the expected type is not fully