diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-26 15:33:29 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-26 16:46:36 -0700 |
commit | de249bab42c36b2ce2f5af478a98ce411ab5c9b3 (patch) | |
tree | 3b5800b71433c0d6c77bcee1c7658437822d18ce /test | |
parent | 41073f8db662906ada4b779f199ea6d5f4bd5e1f (diff) | |
download | scala-de249bab42c36b2ce2f5af478a98ce411ab5c9b3.tar.gz scala-de249bab42c36b2ce2f5af478a98ce411ab5c9b3.tar.bz2 scala-de249bab42c36b2ce2f5af478a98ce411ab5c9b3.zip |
Print raw types correctly.
The "For convenience, these are usable as stub implementations"
bit has generated surprisingly few angry letters, but I noticed
today it blows it on raw types. Or, used to blow it.
/** As seen from class Sub, the missing signatures are as follows.
* For convenience, these are usable as stub implementations.
* (First one before this commitw as 'def raw(x$1: M_1)'
*/
def raw(x$1: M_1[_ <: String]): Unit = ???
def raw(x$1: Any): Unit = ???
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/raw-types-stubs.check | 11 | ||||
-rw-r--r-- | test/files/neg/raw-types-stubs/M_1.java | 3 | ||||
-rw-r--r-- | test/files/neg/raw-types-stubs/Raw_2.java | 4 | ||||
-rw-r--r-- | test/files/neg/raw-types-stubs/S_3.scala | 1 |
4 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/raw-types-stubs.check b/test/files/neg/raw-types-stubs.check new file mode 100644 index 0000000000..f1b26a23b7 --- /dev/null +++ b/test/files/neg/raw-types-stubs.check @@ -0,0 +1,11 @@ +S_3.scala:1: error: class Sub needs to be abstract, since: +it has 2 unimplemented members. +/** As seen from class Sub, the missing signatures are as follows. + * For convenience, these are usable as stub implementations. + */ + def raw(x$1: M_1[_ <: String]): Unit = ??? + def raw(x$1: Any): Unit = ??? + +class Sub extends Raw_2 { } + ^ +one error found diff --git a/test/files/neg/raw-types-stubs/M_1.java b/test/files/neg/raw-types-stubs/M_1.java new file mode 100644 index 0000000000..6ea0d2e593 --- /dev/null +++ b/test/files/neg/raw-types-stubs/M_1.java @@ -0,0 +1,3 @@ +public class M_1<K extends String> { } + + diff --git a/test/files/neg/raw-types-stubs/Raw_2.java b/test/files/neg/raw-types-stubs/Raw_2.java new file mode 100644 index 0000000000..eff7df790e --- /dev/null +++ b/test/files/neg/raw-types-stubs/Raw_2.java @@ -0,0 +1,4 @@ +public abstract class Raw_2 { + public abstract void raw(Object list); + public abstract void raw(M_1 list); +} diff --git a/test/files/neg/raw-types-stubs/S_3.scala b/test/files/neg/raw-types-stubs/S_3.scala new file mode 100644 index 0000000000..618eedc888 --- /dev/null +++ b/test/files/neg/raw-types-stubs/S_3.scala @@ -0,0 +1 @@ +class Sub extends Raw_2 { } |