diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t6534.check | 5 | ||||
-rw-r--r-- | test/files/neg/t6534.scala | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/test/files/neg/t6534.check b/test/files/neg/t6534.check index bd7dc4b71c..52e70cfa8a 100644 --- a/test/files/neg/t6534.check +++ b/test/files/neg/t6534.check @@ -10,5 +10,8 @@ class Bippy3(val x: Int) extends AnyVal { override def equals(x: Any) = false } t6534.scala:7: error: redefinition of hashCode method. See SIP-15, criterion 4. is not allowed in value class class Bippy4(val x: Int) extends AnyVal { override def hashCode = -1 } // error ^ +t6534.scala:9: error: redefinition of equals method. See SIP-15, criterion 4. is not allowed in value class +case class Bippy6(val x: Int) extends AnyVal { override def productPrefix = "Dingo" ; override def equals(x: Any) = false } // error + ^ two warnings found -two errors found +three errors found diff --git a/test/files/neg/t6534.scala b/test/files/neg/t6534.scala index a193179399..de588b69a7 100644 --- a/test/files/neg/t6534.scala +++ b/test/files/neg/t6534.scala @@ -5,3 +5,6 @@ class Bippy1(val x: Int) extends AnyVal with Foo { } // warn class Bippy2(val x: Int) extends AnyVal with Ding { } // warn class Bippy3(val x: Int) extends AnyVal { override def equals(x: Any) = false } // error class Bippy4(val x: Int) extends AnyVal { override def hashCode = -1 } // error +case class Bippy5(val x: Int) extends AnyVal { override def productPrefix = "Dingo" } // nothing +case class Bippy6(val x: Int) extends AnyVal { override def productPrefix = "Dingo" ; override def equals(x: Any) = false } // error + |