Closes #3180. No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@21189 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
odersky 2010-03-16 14:40:43 +00:00
parent f36d3eea61
commit a1c346a736
1 changed files with 5 additions and 2 deletions

View File

@ -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 _ =>
}