diff options
Diffstat (limited to 'test/files/neg/t6534.scala')
-rw-r--r-- | test/files/neg/t6534.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t6534.scala b/test/files/neg/t6534.scala new file mode 100644 index 0000000000..a193179399 --- /dev/null +++ b/test/files/neg/t6534.scala @@ -0,0 +1,7 @@ +trait Foo extends Any { override def equals(x: Any) = false } +trait Ding extends Any { override def hashCode = -1 } + +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 |