diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/caseinherit.check | 6 | ||||
-rw-r--r-- | test/files/neg/caseinherit.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t0816.check | 4 | ||||
-rw-r--r-- | test/files/neg/t0816.scala (renamed from test/files/pos/t0816.scala) | 0 | ||||
-rw-r--r-- | test/files/neg/t425.check | 4 | ||||
-rw-r--r-- | test/files/neg/t425.scala (renamed from test/files/pos/t425.scala) | 0 |
6 files changed, 11 insertions, 4 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 diff --git a/test/files/neg/caseinherit.flags b/test/files/neg/caseinherit.flags deleted file mode 100644 index e8fb65d50c..0000000000 --- a/test/files/neg/caseinherit.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/t0816.check b/test/files/neg/t0816.check new file mode 100644 index 0000000000..ff6489be99 --- /dev/null +++ b/test/files/neg/t0816.check @@ -0,0 +1,4 @@ +t0816.scala:5: error: case class `class Ctest' has case ancestor `class Btest'. Case-to-case inheritance is prohibited. To overcome this limitation use extractors to pattern match on non-leaf nodes. +case class Ctest(override val data: String) extends Btest(data, true) + ^ +one error found diff --git a/test/files/pos/t0816.scala b/test/files/neg/t0816.scala index 0128a0ad72..0128a0ad72 100644 --- a/test/files/pos/t0816.scala +++ b/test/files/neg/t0816.scala diff --git a/test/files/neg/t425.check b/test/files/neg/t425.check new file mode 100644 index 0000000000..671c128753 --- /dev/null +++ b/test/files/neg/t425.check @@ -0,0 +1,4 @@ +t425.scala:3: 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(override val x: Int, y: Double) extends A(x) + ^ +one error found diff --git a/test/files/pos/t425.scala b/test/files/neg/t425.scala index e50c50ac35..e50c50ac35 100644 --- a/test/files/pos/t425.scala +++ b/test/files/neg/t425.scala |