summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-11-13 00:14:40 -0800
committerPaul Phillips <paulp@improving.org>2012-11-19 11:55:06 -0800
commitd5e3f85946af966111f88af90a666a709df0ba6f (patch)
treeedb2d3cfae76679bc0311f3c22d01779a2f32ef3 /src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
parent645c2676dd6699ac24a57dfe750386bbdb827ee8 (diff)
downloadscala-d5e3f85946af966111f88af90a666a709df0ba6f.tar.gz
scala-d5e3f85946af966111f88af90a666a709df0ba6f.tar.bz2
scala-d5e3f85946af966111f88af90a666a709df0ba6f.zip
Revert "Commenting out unused members."
This reverts commit 951fc3a486.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
index ebeb8ef2c8..4f5291507e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
@@ -41,9 +41,9 @@ trait TypeDiagnostics {
* nicer if Symbols, Types, and Trees all implemented some common interface
* in which isErroneous and similar would be placed.
*/
- // def noErroneousTypes(tps: Type*) = tps forall (x => !x.isErroneous)
- // def noErroneousSyms(syms: Symbol*) = syms forall (x => !x.isErroneous)
- // def noErroneousTrees(trees: Tree*) = trees forall (x => !x.isErroneous)
+ def noErroneousTypes(tps: Type*) = tps forall (x => !x.isErroneous)
+ def noErroneousSyms(syms: Symbol*) = syms forall (x => !x.isErroneous)
+ def noErroneousTrees(trees: Tree*) = trees forall (x => !x.isErroneous)
/** For errors which are artifacts of the implementation: such messages
* indicate that the restriction may be lifted in the future.
@@ -294,7 +294,7 @@ trait TypeDiagnostics {
// distinguished from the other types in the same error message
private val savedName = sym.name
def restoreName() = sym.name = savedName
- // def isAltered = sym.name != savedName
+ def isAltered = sym.name != savedName
def modifyName(f: String => String) = sym setName newTypeName(f(sym.name.toString))
/** Prepend java.lang, scala., or Predef. if this type originated
@@ -478,10 +478,10 @@ trait TypeDiagnostics {
}
super.traverse(t)
}
- // def isUnused(t: Tree): Boolean = (
- // if (t.symbol.isTerm) isUnusedTerm(t.symbol)
- // else isUnusedType(t.symbol)
- // )
+ def isUnused(t: Tree): Boolean = (
+ if (t.symbol.isTerm) isUnusedTerm(t.symbol)
+ else isUnusedType(t.symbol)
+ )
def isUnusedType(m: Symbol): Boolean = (
m.isType
&& !m.isTypeParameterOrSkolem // would be nice to improve this