summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
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))
+ }
}
}