diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-03-21 19:13:29 +0100 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-03-23 11:03:02 +0100 |
commit | f8022c216d84af482b27c04c3c38a2d8dce9a192 (patch) | |
tree | c937ff7308606d8ec4d777c633c007b0d96cee9a /src/compiler/scala/tools/nsc/typechecker/Infer.scala | |
parent | 8279a730f02161b2cb078f0c7aa9856a891ca86a (diff) | |
download | scala-f8022c216d84af482b27c04c3c38a2d8dce9a192.tar.gz scala-f8022c216d84af482b27c04c3c38a2d8dce9a192.tar.bz2 scala-f8022c216d84af482b27c04c3c38a2d8dce9a192.zip |
don't throw error in setError when -Ydebug
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Infer.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index a59622d4df..a1ca4904f4 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -196,10 +196,12 @@ trait Infer { /* -- Error Messages --------------------------------------------------- */ def setError[T <: Tree](tree: T): T = { - if (settings.debug.value) { // DEBUG - println("set error: "+tree); - throw new Error() - } + debuglog("set error: "+ tree) + // this breaks -Ydebug pretty radically + // if (settings.debug.value) { // DEBUG + // println("set error: "+tree); + // throw new Error() + // } def name = newTermName("<error: " + tree.symbol + ">") def errorClass = if (context.reportErrors) context.owner.newErrorClass(name.toTypeName) else stdErrorClass def errorValue = if (context.reportErrors) context.owner.newErrorValue(name) else stdErrorValue |