From 97fe31169c5135069f8f247637dff3d5e3444de0 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 19 May 2013 12:40:31 -0700 Subject: Annotated return type of a method. Because nobody should have to guess a return type like (List[Type], Array[Int], Boolean). In fact nobody should ever experience such a return type at all. --- src/compiler/scala/tools/nsc/typechecker/Infer.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 5ab9aa68bc..85533adbc6 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -737,7 +737,7 @@ trait Infer extends Checkable { * to the corresponding position in params * - namesOK is false when there's an invalid use of named arguments */ - private def checkNames(argtpes: List[Type], params: List[Symbol]) = { + private def checkNames(argtpes: List[Type], params: List[Symbol]): (List[Type], Array[Int], Boolean) = { val argPos = Array.fill(argtpes.length)(-1) var positionalAllowed, namesOK = true var index = 0 @@ -858,9 +858,8 @@ trait Infer extends Checkable { } } - /** Is there an instantiation of free type variables `undetparams` - * such that function type `ftpe` is applicable to - * `argtpes` and its result conform to `pt`? + /** Is there an instantiation of free type variables `undetparams` such that + * function type `ftpe` is applicable to `argtpes0` and its result conform to `pt`? * * @param ftpe the type of the function (often a MethodType) * @param argtpes0 the argument types; a NamedType(name, tp) for named -- cgit v1.2.3