summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-02-10 18:45:55 +0000
committerPaul Phillips <paulp@improving.org>2009-02-10 18:45:55 +0000
commitf4720669d6b4946653b5b419d85f5ec5a1e95bad (patch)
treedb26965e258472e2ff56aa216b8fcc36d37a9ab6 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent8d017c0f1e3478f2736a8df624492b73190b0976 (diff)
downloadscala-f4720669d6b4946653b5b419d85f5ec5a1e95bad.tar.gz
scala-f4720669d6b4946653b5b419d85f5ec5a1e95bad.tar.bz2
scala-f4720669d6b4946653b5b419d85f5ec5a1e95bad.zip
Fixes and test cases for #944 and #1523.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index ecce748314..20e5a9101e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1516,6 +1516,9 @@ trait Typers { self: Analyzer =>
def typedFunction(fun: Function, mode: Int, pt: Type): Tree = {
val codeExpected = !forCLDC && !forMSIL && (pt.typeSymbol isNonBottomSubClass CodeClass)
+ if (fun.vparams.length > definitions.MaxFunctionArity)
+ return errorTree(fun, "implementation restricts functions to " + definitions.MaxFunctionArity + " parameters")
+
def decompose(pt: Type): (Symbol, List[Type], Type) =
if ((isFunctionType(pt)
||