summaryrefslogtreecommitdiff
path: root/src/compiler
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 18:27:57 +0100
commitbc44da79df7810f65bc14e19167a85796e675b45 (patch)
treec937ff7308606d8ec4d777c633c007b0d96cee9a /src/compiler
parent08a3ca9a2ffb7d880d44e3b3b601221e166c1d50 (diff)
downloadscala-bc44da79df7810f65bc14e19167a85796e675b45.tar.gz
scala-bc44da79df7810f65bc14e19167a85796e675b45.tar.bz2
scala-bc44da79df7810f65bc14e19167a85796e675b45.zip
don't throw error in setError when -Ydebug
Diffstat (limited to 'src/compiler')
-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