diff options
author | Martin Odersky <odersky@gmail.com> | 2005-09-26 14:40:42 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2005-09-26 14:40:42 +0000 |
commit | 5b8594a6beef0c0c88d6ef033ecb5314e1ae73a2 (patch) | |
tree | 145a9dd485c363e33c22e3e5e8d37fc541b1d411 /sources/scala/tools/nsc/typechecker/Typers.scala | |
parent | b18e6b9a5a2d6c08217e83fa7afde2ea495298da (diff) | |
download | scala-5b8594a6beef0c0c88d6ef033ecb5314e1ae73a2.tar.gz scala-5b8594a6beef0c0c88d6ef033ecb5314e1ae73a2.tar.bz2 scala-5b8594a6beef0c0c88d6ef033ecb5314e1ae73a2.zip |
*** empty log message ***
Diffstat (limited to 'sources/scala/tools/nsc/typechecker/Typers.scala')
-rwxr-xr-x | sources/scala/tools/nsc/typechecker/Typers.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/scala/tools/nsc/typechecker/Typers.scala b/sources/scala/tools/nsc/typechecker/Typers.scala index da38fff387..e5d409abe9 100755 --- a/sources/scala/tools/nsc/typechecker/Typers.scala +++ b/sources/scala/tools/nsc/typechecker/Typers.scala @@ -880,7 +880,7 @@ abstract class Typers: Analyzer { case ErrorType => setError(tree) case _ => - throw new Error("Matcherror at " + phase);//debug + throw new Error("Matcherror at " + phase + " " + fun.tpe);//debug } /** The qualifying class of a this or super with prefix `qual' */ @@ -1166,7 +1166,7 @@ abstract class Typers: Analyzer { val enclFun = if (tree.symbol != NoSymbol) tree.symbol else context.owner.enclMethod; if (!enclFun.isMethod || enclFun.isConstructor) errorTree(tree, "return outside method definition") - else if (!context.owner.hasFlag(INITIALIZED)) + else if (!context.owner.isInitialized) errorTree(tree, "method " + context.owner + " has return statement; needs result type") else { val expr1: Tree = typed(expr, enclFun.tpe.finalResultType); |