From 199ec3c10fe7d2b2029ea8ae6a19240b46181435 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 28 Apr 2011 16:23:45 +0000 Subject: Improved the error message for another of the m... Improved the error message for another of the most common situations I hear about in newbieland. It could be taken further. If compilation fails due to an unimplemented abstract method, and there is a concrete method of the same name and arity, it will do a pairwise analysis of the parameters and attempt to further explain where you went off the beam if it feels it can do so sensibly. Such as in the test case: % scalac S.scala S.scala:1: error: class S needs to be abstract, since method g in class J of type (y: Int,z: java.util.List)Int is not defined (Note that java.util.List does not match java.util.List[String]. To implement a raw type, use java.util.List[_]) class S extends J { ^ one error found No review. --- test/files/neg/abstract-class-error.check | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/files/neg/abstract-class-error.check (limited to 'test/files/neg/abstract-class-error.check') diff --git a/test/files/neg/abstract-class-error.check b/test/files/neg/abstract-class-error.check new file mode 100644 index 0000000000..b8a0c6e70b --- /dev/null +++ b/test/files/neg/abstract-class-error.check @@ -0,0 +1,5 @@ +S.scala:1: error: class S needs to be abstract, since method g in class J of type (y: Int,z: java.util.List)Int is not defined +(Note that java.util.List does not match java.util.List[String]. To implement a raw type, use java.util.List[_]) +class S extends J { + ^ +one error found -- cgit v1.2.3