From 1a2ec87c0964ad3bf42d49bbdaebd66b45506210 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 3 Jul 2012 23:59:39 +0200 Subject: SI-6013 Disallow deferred members from intermediate java parents. 76c76b28f allowed for the fact that a Java method can override a super class method without matching its type in a Scala sense; it need only match its type after erasure. However that change went too far, and considered a concrete method in a base class to override a deferred method in a subclass. --- test/files/neg/t6013.check | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/neg/t6013.check (limited to 'test/files/neg/t6013.check') diff --git a/test/files/neg/t6013.check b/test/files/neg/t6013.check new file mode 100644 index 0000000000..502da999f5 --- /dev/null +++ b/test/files/neg/t6013.check @@ -0,0 +1,7 @@ +DerivedScala.scala:4: error: class C needs to be abstract, since there is a deferred declaration of method foo in class B of type => Int which is not implemented in a subclass +class C extends B + ^ +DerivedScala.scala:7: error: class DerivedScala needs to be abstract, since there is a deferred declaration of method foo in class Abstract of type ()Boolean which is not implemented in a subclass +class DerivedScala extends Abstract + ^ +two errors found -- cgit v1.2.3