diff options
author | Paul Phillips <paulp@improving.org> | 2011-10-14 02:16:17 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-10-14 02:16:17 +0000 |
commit | fcd0998f1e0f2307e9b0cbae6bf2c36234ca8d17 (patch) | |
tree | 3eb2fa53283a9f399cd3e11a15a391b9d0307ca3 /test/files/neg/abstract-report.check | |
parent | bca8959a1ab162dadec51c0db7d062315f5e4d6e (diff) | |
download | scala-fcd0998f1e0f2307e9b0cbae6bf2c36234ca8d17.tar.gz scala-fcd0998f1e0f2307e9b0cbae6bf2c36234ca8d17.tar.bz2 scala-fcd0998f1e0f2307e9b0cbae6bf2c36234ca8d17.zip |
Better error when abstract methods are missing.
When many methods are missing, print a list of signatures the way they
need to be implemented, and throw in ??? stub implementations so it
should be compilable code. If anyone would like this logic exposed more
generally (for the IDE or whatever) just let me know. No review.
Diffstat (limited to 'test/files/neg/abstract-report.check')
-rw-r--r-- | test/files/neg/abstract-report.check | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/files/neg/abstract-report.check b/test/files/neg/abstract-report.check new file mode 100644 index 0000000000..bd550f39f4 --- /dev/null +++ b/test/files/neg/abstract-report.check @@ -0,0 +1,24 @@ +abstract-report.scala:1: error: class Unimplemented needs to be abstract, since: +it has 12 unimplemented members. +/** As seen from class Unimplemented, the missing signatures are as follows. + * For convenience, these are usable as stub implementations. + */ + // Members declared in scala.collection.GenTraversableOnce + def isTraversableAgain: Boolean = ??? + def toIterator: Iterator[String] = ??? + def toStream: Stream[String] = ??? + + // Members declared in scala.collection.TraversableOnce + def copyToArray[B >: String](xs: Array[B],start: Int,len: Int): Unit = ??? + def exists(p: String => Boolean): Boolean = ??? + def find(p: String => Boolean): Option[String] = ??? + def forall(p: String => Boolean): Boolean = ??? + def foreach[U](f: String => U): Unit = ??? + def hasDefiniteSize: Boolean = ??? + def isEmpty: Boolean = ??? + def seq: scala.collection.TraversableOnce[String] = ??? + def toTraversable: Traversable[String] = ??? + +class Unimplemented extends TraversableOnce[String] { } + ^ +one error found |