From 533c7397ed39f1f1c216cd3ada8eb9b3e825d521 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 16 Mar 2010 14:40:43 +0000 Subject: Closes #3180. No review. --- src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 8b9ed69f47..142c116a9e 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -350,8 +350,11 @@ self => /** Check that type parameter is not by name T* */ def checkNotByName(t: Tree) = t match { - case AppliedTypeTree(Select(_, n), _) if (n == nme.BYNAME_PARAM_CLASS_NAME.toTypeName) => - syntaxError(t.pos, "no by-name parameter type allowed here", false) + case AppliedTypeTree(Select(_, n), _) => + if (n == nme.BYNAME_PARAM_CLASS_NAME.toTypeName) + syntaxError(t.pos, "no by-name parameter type allowed here", false) + else if (n == nme.REPEATED_PARAM_CLASS_NAME.toTypeName) + syntaxError(t.pos, "no * parameter type allowed here", false) case _ => } -- cgit v1.2.3