summaryrefslogtreecommitdiff
path: root/test/pending/pos/bug4704.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-19 19:40:08 -0800
committerPaul Phillips <paulp@improving.org>2012-02-19 20:15:11 -0800
commita6a9684f5ba5df146be1f24bd170e97f0b2208ce (patch)
treeb6c610fb4173e0561a2df7487f23fb17b715e2c3 /test/pending/pos/bug4704.scala
parente512518d25818b4b0381e4a078137734f8eab12f (diff)
downloadscala-a6a9684f5ba5df146be1f24bd170e97f0b2208ce.tar.gz
scala-a6a9684f5ba5df146be1f24bd170e97f0b2208ce.tar.bz2
scala-a6a9684f5ba5df146be1f24bd170e97f0b2208ce.zip
A better error message for inheritance conflict.
And some tests for pending. Closes SI-5358.
Diffstat (limited to 'test/pending/pos/bug4704.scala')
-rw-r--r--test/pending/pos/bug4704.scala36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/pending/pos/bug4704.scala b/test/pending/pos/bug4704.scala
new file mode 100644
index 0000000000..6af719adf7
--- /dev/null
+++ b/test/pending/pos/bug4704.scala
@@ -0,0 +1,36 @@
+trait Bar {
+ def f1 = super.hashCode
+ def f2 = super[Object].hashCode
+ def f3 = super[ScalaObject].hashCode
+
+ override def hashCode = 1
+}
+trait Barzoo {
+ def g1 = super.hashCode
+ def g2 = super[Object].hashCode
+ def g3 = super[ScalaObject].hashCode
+
+ override def hashCode = 2
+}
+
+trait Foo extends Bar with Barzoo {
+ def f4 = super.hashCode
+ def f5 = super[Object].hashCode
+ def f6 = super[ScalaObject].hashCode
+ def f6b = super[Bar].hashCode
+ def g4 = super[Barzoo].hashCode
+
+ override def hashCode = super[Bar].hashCode + super[Barzoo].hashCode
+}
+
+class Quux extends Foo {
+ override def hashCode = super.hashCode + super[Object].hashCode + super[ScalaObject].hashCode + super[Foo].hashCode
+}
+
+trait Borp extends Quux {
+ def f12 = super.hashCode
+ def f14 = super[ScalaObject].hashCode
+ def f15 = super[Quux].hashCode
+ override def hashCode = super[Quux].hashCode
+}
+