diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-19 12:40:31 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-20 10:01:40 -0700 |
commit | 97fe31169c5135069f8f247637dff3d5e3444de0 (patch) | |
tree | 79054572071ea74e4ade7c913c94edf3dbce1982 | |
parent | 6adbcfa8bede2083876a26accab312c099ed6d41 (diff) | |
download | scala-97fe31169c5135069f8f247637dff3d5e3444de0.tar.gz scala-97fe31169c5135069f8f247637dff3d5e3444de0.tar.bz2 scala-97fe31169c5135069f8f247637dff3d5e3444de0.zip |
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.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 7 |
1 files changed, 3 insertions, 4 deletions
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 |