diff options
author | Martin Odersky <odersky@gmail.com> | 2007-08-21 14:04:16 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-08-21 14:04:16 +0000 |
commit | 93e7d7fe4d11f4cf474b31e9950ab4eb6457743d (patch) | |
tree | 051a0a985e35e22298ac315fce1d43cba94618d2 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | ecbe1cdd177b903796a65e29c6a2104197c54654 (diff) | |
download | scala-93e7d7fe4d11f4cf474b31e9950ab4eb6457743d.tar.gz scala-93e7d7fe4d11f4cf474b31e9950ab4eb6457743d.tar.bz2 scala-93e7d7fe4d11f4cf474b31e9950ab4eb6457743d.zip |
some fix for bug1279
applied Koltsov patch
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 6794c9d58b..c0052ccc10 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -291,10 +291,12 @@ trait Typers { self: Analyzer => def checkParamsConvertible(pos: Position, tpe: Type) { tpe match { case MethodType(formals, restpe) => + /* if (formals.exists(_.typeSymbol == ByNameParamClass) && formals.length != 1) error(pos, "methods with `=>'-parameter can be converted to function values only if they take no other parameters") if (formals exists (_.typeSymbol == RepeatedParamClass)) error(pos, "methods with `*'-parameters cannot be converted to function values"); + */ if (restpe.isDependent) error(pos, "method with dependent type "+tpe+" cannot be converted to function value"); checkParamsConvertible(pos, restpe) |