diff options
author | Paul Phillips <paulp@improving.org> | 2010-09-22 21:05:18 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-09-22 21:05:18 +0000 |
commit | ffd6cff38f9a12725d1bf0f30920ce58529695b4 (patch) | |
tree | 035b0418a27f1a5057516a3c940f315476a12783 /test/files | |
parent | 2e7bd469cd4bf887c7fd230f56e2f77e1241f6b5 (diff) | |
download | scala-ffd6cff38f9a12725d1bf0f30920ce58529695b4.tar.gz scala-ffd6cff38f9a12725d1bf0f30920ce58529695b4.tar.bz2 scala-ffd6cff38f9a12725d1bf0f30920ce58529695b4.zip |
Test case closes #1548, no review.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/bug1548.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug1548/J.java | 12 | ||||
-rw-r--r-- | test/files/neg/bug1548/S.scala | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/bug1548.check b/test/files/neg/bug1548.check new file mode 100644 index 0000000000..7f5a3f44e2 --- /dev/null +++ b/test/files/neg/bug1548.check @@ -0,0 +1,4 @@ +S.scala:2: error: method defaultMethod overrides nothing + override def defaultMethod = "Boo!" + ^ +one error found diff --git a/test/files/neg/bug1548/J.java b/test/files/neg/bug1548/J.java new file mode 100644 index 0000000000..01dd56d348 --- /dev/null +++ b/test/files/neg/bug1548/J.java @@ -0,0 +1,12 @@ +package javapkg; + +public class J { + + String defaultMethod() { + return "foo"; + } + + public String toString() { + return "JavaClass: "+defaultMethod(); + } +}
\ No newline at end of file diff --git a/test/files/neg/bug1548/S.scala b/test/files/neg/bug1548/S.scala new file mode 100644 index 0000000000..086b78029d --- /dev/null +++ b/test/files/neg/bug1548/S.scala @@ -0,0 +1,3 @@ +class ScalaClass extends javapkg.J { + override def defaultMethod = "Boo!" +} |