diff options
author | Paul Phillips <paulp@improving.org> | 2012-05-15 10:21:26 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-05-15 11:12:40 -0700 |
commit | 317a1056cd8062331964d1bc65f1bfd945538551 (patch) | |
tree | d3682713ea5fd99579eb7240ec587cdc92bf2fed /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | |
parent | 8a3ed4cc955dd85f37cc148265e920435b009a29 (diff) | |
download | scala-317a1056cd8062331964d1bc65f1bfd945538551.tar.gz scala-317a1056cd8062331964d1bc65f1bfd945538551.tar.bz2 scala-317a1056cd8062331964d1bc65f1bfd945538551.zip |
Removing extraneous files.
Culling accumulated unnecessary code.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala index 08bf581256..0c1638b76f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala @@ -9,7 +9,6 @@ package typechecker import scala.collection.{ mutable, immutable } import scala.tools.util.StringOps.{ countElementsAsString, countAsString } import symtab.Flags.{ PRIVATE, PROTECTED } -import scala.tools.util.EditDistance.similarString trait ContextErrors { self: Analyzer => @@ -171,36 +170,7 @@ trait ContextErrors { NormalTypeError(tree, "reference to " + name + " is ambiguous;\n" + msg) def SymbolNotFoundError(tree: Tree, name: Name, owner: Symbol, startingIdentCx: Context) = { - /*** Disabled pending investigation of performance impact. - - // This laborious determination arrived at to keep the tests working. - val calcSimilar = ( - name.length > 2 && ( - startingIdentCx.reportErrors - || startingIdentCx.enclClassOrMethod.reportErrors - ) - ) - // avoid calculating if we're in "silent" mode. - // name length check to limit unhelpful suggestions for e.g. "x" and "b1" - val similar = { - if (!calcSimilar) "" - else { - val allowed = ( - startingIdentCx.enclosingContextChain - flatMap (ctx => ctx.scope.toList ++ ctx.imports.flatMap(_.allImportedSymbols)) - filter (sym => sym.isTerm == name.isTermName) - filterNot (sym => sym.isPackage || sym.isSynthetic || sym.hasMeaninglessName) - ) - val allowedStrings = ( - allowed.map("" + _.name).distinct.sorted - filterNot (s => (s contains '$') || (s contains ' ')) - ) - similarString("" + name, allowedStrings) - } - } - */ - val similar = "" - NormalTypeError(tree, "not found: "+decodeWithKind(name, owner) + similar) + NormalTypeError(tree, "not found: "+decodeWithKind(name, owner)) } // typedAppliedTypeTree |