blob: 8803faba0f54bca985907fc854045e386b7383b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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();
}
}
|