summaryrefslogtreecommitdiff
path: root/sources/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2005-09-26 14:40:42 +0000
committerMartin Odersky <odersky@gmail.com>2005-09-26 14:40:42 +0000
commit5b8594a6beef0c0c88d6ef033ecb5314e1ae73a2 (patch)
tree145a9dd485c363e33c22e3e5e8d37fc541b1d411 /sources/scala/tools/nsc/typechecker/Typers.scala
parentb18e6b9a5a2d6c08217e83fa7afde2ea495298da (diff)
downloadscala-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-xsources/scala/tools/nsc/typechecker/Typers.scala4
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);