diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-07-13 08:05:04 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-07-13 08:05:04 +0000 |
commit | 8a0d130537be8c3716ab9191d84c53d39aaa1804 (patch) | |
tree | 8517ab3b5e82f4bb681f048e702b96f8e9d2d0fc /test/files/neg/caseinherit.check | |
parent | 038fef39ad4310fc3fe1c5324b004e42fd0036b3 (diff) | |
download | scala-8a0d130537be8c3716ab9191d84c53d39aaa1804.tar.gz scala-8a0d130537be8c3716ab9191d84c53d39aaa1804.tar.bz2 scala-8a0d130537be8c3716ab9191d84c53d39aaa1804.zip |
prohibit case-to-case inheritance instead of is...
prohibit case-to-case inheritance instead of issuing warning. closes
#4109. review by extempore, since it should make your life much easier
in the pattern matcher
Diffstat (limited to 'test/files/neg/caseinherit.check')
-rw-r--r-- | test/files/neg/caseinherit.check | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/neg/caseinherit.check b/test/files/neg/caseinherit.check index 5630da2a3e..c185c82f70 100644 --- a/test/files/neg/caseinherit.check +++ b/test/files/neg/caseinherit.check @@ -1,10 +1,10 @@ -caseinherit.scala:2: error: case class `class B' has case ancestor `class A'. Case-to-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. +caseinherit.scala:2: error: case class `class B' has case ancestor `class A'. Case-to-case inheritance is prohibited. To overcome this limitation use extractors to pattern match on non-leaf nodes. case class B(y: Int) extends A(y) ^ -caseinherit.scala:3: error: case class `object Bippy' has case ancestor `class A'. Case-to-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. +caseinherit.scala:3: error: case class `object Bippy' has case ancestor `class A'. Case-to-case inheritance is prohibited. To overcome this limitation use extractors to pattern match on non-leaf nodes. case object Bippy extends A(55) ^ -caseinherit.scala:6: error: case class `class Dingus' has case ancestor `class A'. Case-to-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. +caseinherit.scala:6: error: case class `class Dingus' has case ancestor `class A'. Case-to-case inheritance is prohibited. To overcome this limitation use extractors to pattern match on non-leaf nodes. case class Dingus(y: Int) extends Innocent ^ three errors found |