summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-06-06 23:53:50 +0000
committerPaul Phillips <paulp@improving.org>2011-06-06 23:53:50 +0000
commitb8575e9636004b4abfbd5cd4b0a71c39bf8b1127 (patch)
treef1c107751ae890f3c0b19e349fc2a32481c84658 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent29cdb5837ca05a883093bb0e7ddfac264c84afea (diff)
downloadscala-b8575e9636004b4abfbd5cd4b0a71c39bf8b1127.tar.gz
scala-b8575e9636004b4abfbd5cd4b0a71c39bf8b1127.tar.bz2
scala-b8575e9636004b4abfbd5cd4b0a71c39bf8b1127.zip
Proliferating the number of debugging modes bec...
Proliferating the number of debugging modes because it's still way too hard to see what's going on in there. Until we get hubert's type debugger with its whiz-bang whizbanginess, we'll have to struggle along with somewhat prettier ascii. This introduces: -Yinfer-debug which tries to print in readable fashion what is happening in the worlds of inference and implicit search. It should be made a bit more complementary and less overlappy with -Ytyper-debug. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index f1eb904c58..56d5ce9842 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1147,11 +1147,12 @@ abstract class RefChecks extends InfoTransform {
*/
private def checkDeprecated(sym: Symbol, pos: Position) {
if (sym.isDeprecated && !currentOwner.ownerChain.exists(x => x.isDeprecated || x.hasBridgeAnnotation)) {
- val dmsg = sym.deprecationMessage map (": " + _) getOrElse ""
-
- unit.deprecationWarning(pos, sym.fullLocationString + " is deprecated" + dmsg)
+ unit.deprecationWarning(pos, "%s%s is deprecated%s".format(
+ sym, sym.locationString, sym.deprecationMessage map (": " + _) getOrElse "")
+ )
}
}
+
/** Similar to deprecation: check if the symbol is marked with @migration
* indicating it has changed semantics between versions.
*/
@@ -1230,7 +1231,7 @@ abstract class RefChecks extends InfoTransform {
private def transformCaseApply(tree: Tree, ifNot: => Unit) = {
val sym = tree.symbol
- if (sym.isSourceMethod && sym.hasFlag(CASE) && sym.name == nme.apply)
+ if (sym.isSourceMethod && sym.isCase && sym.name == nme.apply)
toConstructor(tree.pos, tree.tpe)
else {
ifNot