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 18:27:57 +0100 |
commit | bc44da79df7810f65bc14e19167a85796e675b45 (patch) | |
tree | c937ff7308606d8ec4d777c633c007b0d96cee9a | |
parent | 08a3ca9a2ffb7d880d44e3b3b601221e166c1d50 (diff) | |
download | scala-bc44da79df7810f65bc14e19167a85796e675b45.tar.gz scala-bc44da79df7810f65bc14e19167a85796e675b45.tar.bz2 scala-bc44da79df7810f65bc14e19167a85796e675b45.zip |
don't throw error in setError when -Ydebug
-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 |