From fcd0998f1e0f2307e9b0cbae6bf2c36234ca8d17 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 14 Oct 2011 02:16:17 +0000 Subject: 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. --- test/files/neg/t856.check | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test/files/neg/t856.check') diff --git a/test/files/neg/t856.check b/test/files/neg/t856.check index d0bbde6c58..02978e1622 100644 --- a/test/files/neg/t856.check +++ b/test/files/neg/t856.check @@ -1,6 +1,14 @@ t856.scala:3: error: class ComplexRect needs to be abstract, since: -method _2 in trait Product2 of type => Double is not defined -method canEqual in trait Equals of type (that: Any)Boolean is not defined +it has 2 unimplemented members. +/** As seen from class ComplexRect, the missing signatures are as follows. + * For convenience, these are usable as stub implementations. + */ + // Members declared in scala.Equals + def canEqual(that: Any): Boolean = ??? + + // Members declared in scala.Product2 + def _2: Double = ??? + class ComplexRect(val _1:Double, _2:Double) extends Complex { ^ one error found -- cgit v1.2.3