summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-07 11:50:25 +0000
committerPaul Phillips <paulp@improving.org>2011-03-07 11:50:25 +0000
commit5f491e5d037b799476747f0dee6ea50fe87c269b (patch)
tree8ade8ac91441e620a3539ec4b1d49d5196547a4c /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentca392540e36bf1fc52350901b3faf5bc08f4175c (diff)
downloadscala-5f491e5d037b799476747f0dee6ea50fe87c269b.tar.gz
scala-5f491e5d037b799476747f0dee6ea50fe87c269b.tar.bz2
scala-5f491e5d037b799476747f0dee6ea50fe87c269b.zip
Raised the scariness of the case class deprecat...
Raised the scariness of the case class deprecation message. (I hope you don't mind, hubert, I like writing scary messages.) Closes #4109 I suppose, no review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 649af74d43..cf28ea24fe 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1011,12 +1011,13 @@ trait Typers extends Modes {
// "change your code now!" as there are material bugs (which are very unlikely
// to be fixed) associated with case class inheritance.
if (!phase.erasedTypes) {
- for (ancestor <- clazz.ancestors find (_.isCase))
+ for (ancestor <- clazz.ancestors find (_.isCase)) {
unit.deprecationWarning(clazz.pos, (
- "case class `%s' has case class ancestor `%s'. This has been deprecated " +
- "for unduly complicating both usage and implementation. You should instead " +
- "use extractors for pattern matching on non-leaf nodes." ).format(clazz, ancestor)
- )
+ "case class `%s' has case ancestor `%s'. Case inheritance has potentially "+
+ "dangerous bugs which are unlikely to be fixed. You are strongly encouraged to "+
+ "instead use extractors to pattern match on non-leaf nodes."
+ ).format(clazz, ancestor))
+ }
}
}