diff options
author | Paul Phillips <paulp@improving.org> | 2011-10-17 22:00:57 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-10-17 22:00:57 +0000 |
commit | 23ab7e3c9a46ef6c509a452f8ee3d2f224235bde (patch) | |
tree | 3aab2bd751a9825afc567ccb1055cd215de71cce /src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala | |
parent | a98d0903a8a02f806726a45b65842a0da21115b7 (diff) | |
download | scala-23ab7e3c9a46ef6c509a452f8ee3d2f224235bde.tar.gz scala-23ab7e3c9a46ef6c509a452f8ee3d2f224235bde.tar.bz2 scala-23ab7e3c9a46ef6c509a452f8ee3d2f224235bde.zip |
Overhaul of Namers.
I can't go bear hunting without a clean gun. Basically I iterated over
Namers until I could understand it. I added a variety of documentation
there and elsewhere. There shouldn't be anything particularly behavioral
changing in this commit, but I did delete some years-old code (having
huge commented out blocks of way-out-of-date code is not a boon to
understanding) and the debugging output will look different. Better, one
can hope.
How about, review by moors.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala index 42f8188ac1..080a802272 100644 --- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala +++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala @@ -451,6 +451,10 @@ trait TypeDiagnostics { private def contextError(pos: Position, msg: String) = context.error(pos, msg) private def contextError(pos: Position, err: Throwable) = context.error(pos, err) + private def contextWarning(pos: Position, msg: String) = context.unit.warning(pos, msg) + + def permanentlyHiddenWarning(pos: Position, hidden: Name, defn: Symbol) = + contextWarning(pos, "imported `%s' is permanently hidden by definition of %s".format(hidden, defn.fullLocationString)) object checkDead { private var expr: Symbol = NoSymbol |