diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-19 19:40:08 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-19 20:15:11 -0800 |
commit | a6a9684f5ba5df146be1f24bd170e97f0b2208ce (patch) | |
tree | b6c610fb4173e0561a2df7487f23fb17b715e2c3 /test/files/neg | |
parent | e512518d25818b4b0381e4a078137734f8eab12f (diff) | |
download | scala-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/files/neg')
-rw-r--r-- | test/files/neg/t5358.check | 7 | ||||
-rw-r--r-- | test/files/neg/t5358.scala | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/t5358.check b/test/files/neg/t5358.check new file mode 100644 index 0000000000..59e83bba2f --- /dev/null +++ b/test/files/neg/t5358.check @@ -0,0 +1,7 @@ +t5358.scala:3: error: class C inherits conflicting members: + method hi in trait A of type => String and + method hi in trait B of type => String +(Note: this can be resolved by declaring an override in class C.) +class C extends A with B + ^ +one error found diff --git a/test/files/neg/t5358.scala b/test/files/neg/t5358.scala new file mode 100644 index 0000000000..13d827ed82 --- /dev/null +++ b/test/files/neg/t5358.scala @@ -0,0 +1,4 @@ +trait A { def hi = "A" } +trait B { def hi = "B" } +class C extends A with B + |