summaryrefslogtreecommitdiffstats
path: root/tests/new/AbstractMethodCall.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new/AbstractMethodCall.java')
-rw-r--r--tests/new/AbstractMethodCall.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/new/AbstractMethodCall.java b/tests/new/AbstractMethodCall.java
new file mode 100644
index 000000000..8803faba0
--- /dev/null
+++ b/tests/new/AbstractMethodCall.java
@@ -0,0 +1,18 @@
+
+
+abstract class AbstractClass {
+ public abstract void abstractMethod ();
+}
+
+public class AbstractMethodCall extends AbstractClass {
+ /** @testcase PR591 PUREJAVA compiler error expected when directly calling unimplemented abstract method using super */
+ public void abstractMethodCall () {
+ super.abstractMethod (); // expecting compiler error: cannot access directly
+ }
+ public void abstractMethod() {}
+ public static void main(String[] args) {
+ new AbstractMethodCall().abstractMethodCall();
+ }
+}
+
+