From 009c57d4622fe69394fe031ad7577a4fdee0b1d9 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 13 Nov 2012 08:30:55 -0800 Subject: 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. --- .../scala/tools/nsc/typechecker/TypeDiagnostics.scala | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala') 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 -- cgit v1.2.3