summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-11-13 08:30:55 -0800
committerPaul Phillips <paulp@improving.org>2012-11-20 14:10:53 -0800
commit009c57d4622fe69394fe031ad7577a4fdee0b1d9 (patch)
tree8a3edcf2b3f241069cc2bfc7706eb5cce7f58dcb /src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
parente5b050814deb2e7e1d6d05511d3a6cb6b013b549 (diff)
downloadscala-009c57d4622fe69394fe031ad7577a4fdee0b1d9.tar.gz
scala-009c57d4622fe69394fe031ad7577a4fdee0b1d9.tar.bz2
scala-009c57d4622fe69394fe031ad7577a4fdee0b1d9.zip
Removed code from the typechecker.
Removing code from this neighborhood is more difficult than elsewhere, making it all the more important that it be done.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
index 4f5291507e..19f0b56e94 100644
--- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
@@ -37,14 +37,6 @@ trait TypeDiagnostics {
import global._
import definitions._
- /** The common situation of making sure nothing is erroneous could be
- * 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)
-
/** For errors which are artifacts of the implementation: such messages
* indicate that the restriction may be lifted in the future.
*/
@@ -294,7 +286,6 @@ 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 modifyName(f: String => String) = sym setName newTypeName(f(sym.name.toString))
/** Prepend java.lang, scala., or Predef. if this type originated
@@ -478,10 +469,6 @@ trait TypeDiagnostics {
}
super.traverse(t)
}
- 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