diff options
author | Paul Phillips <paulp@improving.org> | 2012-03-07 07:06:05 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-03-07 07:06:05 -0800 |
commit | b98d748c9ad1f9259f536c80ef513630ce2974a1 (patch) | |
tree | 51a0acab0139b554749f4b030592aac356d43d8a /src | |
parent | 9844cb8fb69c0affa727c5734524dad9eb15ac3c (diff) | |
download | scala-b98d748c9ad1f9259f536c80ef513630ce2974a1.tar.gz scala-b98d748c9ad1f9259f536c80ef513630ce2974a1.tar.bz2 scala-b98d748c9ad1f9259f536c80ef513630ce2974a1.zip |
Changed printlns to use debugwarn.
If you write something like
if (settings.debug.value) println("...")
Consider debugwarn("...") instead, which amounts to the same thing
except that it's much better because naked printlns can't be managed
with any uniformity.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/reflect/internal/Types.scala | 4 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala index 64edbdb8bd..b7b7ca5840 100644 --- a/src/compiler/scala/reflect/internal/Types.scala +++ b/src/compiler/scala/reflect/internal/Types.scala @@ -4579,7 +4579,7 @@ trait Types extends api.Types { self: SymbolTable => var rebind0 = pre.findMember(sym.name, BRIDGE, 0, true) if (rebind0 == NoSymbol) { if (sym.isAliasType) throw missingAliasException - if (settings.debug.value) println(pre+"."+sym+" does no longer exist, phase = "+phase) + debugwarn(pre+"."+sym+" does no longer exist, phase = "+phase) throw new MissingTypeControl // For build manager and presentation compiler purposes //assert(false, pre+"."+sym+" does no longer exist, phase = "+phase) } @@ -4635,7 +4635,7 @@ trait Types extends api.Types { self: SymbolTable => if ((pre1 eq pre) && (sym1 eq sym) && (args1 eq args)/* && sym.isExternal*/) { tp } else if (sym1 == NoSymbol) { - if (settings.debug.value) println("adapt fail: "+pre+" "+pre1+" "+sym) + debugwarn("adapt fail: "+pre+" "+pre1+" "+sym) tp } else { copyTypeRef(tp, pre1, sym1, args1) diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 261cc18d26..2c564c097f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -312,14 +312,14 @@ trait Contexts { self: Analyzer => unit.error(pos, if (checking) "\n**** ERROR DURING INTERNAL CHECKING ****\n" + msg else msg) def issue(err: AbsTypeError) { - if (settings.debug.value) println("issue error: " + err.errMsg) + debugwarn("issue error: " + err.errMsg) if (reportErrors) unitError(err.errPos, addDiagString(err.errMsg)) else if (bufferErrors) { buffer += err } else throw new TypeError(err.errPos, err.errMsg) } def issueAmbiguousError(pre: Type, sym1: Symbol, sym2: Symbol, err: AbsTypeError) { - if (settings.debug.value) println("issue ambiguous error: " + err.errMsg) + debugwarn("issue ambiguous error: " + err.errMsg) if (ambiguousErrors) { if (!pre.isErroneous && !sym1.isErroneous && !sym2.isErroneous) unitError(err.errPos, err.errMsg) @@ -328,7 +328,7 @@ trait Contexts { self: Analyzer => } def issueAmbiguousError(err: AbsTypeError) { - if (settings.debug.value) println("issue ambiguous error: " + err.errMsg) + debugwarn("issue ambiguous error: " + err.errMsg) if (ambiguousErrors) unitError(err.errPos, addDiagString(err.errMsg)) else if (bufferErrors) { buffer += err } |