summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Infer.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-03-21 19:13:29 +0100
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-03-23 11:03:02 +0100
commitf8022c216d84af482b27c04c3c38a2d8dce9a192 (patch)
treec937ff7308606d8ec4d777c633c007b0d96cee9a /src/compiler/scala/tools/nsc/typechecker/Infer.scala
parent8279a730f02161b2cb078f0c7aa9856a891ca86a (diff)
downloadscala-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.scala10
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