From 72ee06de4cc0b8c12acf07c892302a3043a1e578 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 10 Jun 2012 17:51:21 +0200 Subject: SI-4989 Reject super.x if an intermediate class declares x abstract. This is in line with Java's treatment. Without this, an AbstractMethodError is thrown at runtime. --- test/files/neg/t4989.check | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/neg/t4989.check (limited to 'test/files/neg/t4989.check') diff --git a/test/files/neg/t4989.check b/test/files/neg/t4989.check new file mode 100644 index 0000000000..814507fc3f --- /dev/null +++ b/test/files/neg/t4989.check @@ -0,0 +1,7 @@ +t4989.scala:14: error: method print in class A cannot be directly accessed from class C because class B redeclares it as abstract + override def print(): String = super.print() // should be an error + ^ +t4989.scala:18: error: method print in class A cannot be directly accessed from trait T because class B redeclares it as abstract + override def print(): String = super.print() // should be an error + ^ +two errors found -- cgit v1.2.3