diff options
Diffstat (limited to 'libjava/testsuite/libjava.lang/pr8823.java')
-rw-r--r-- | libjava/testsuite/libjava.lang/pr8823.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.lang/pr8823.java b/libjava/testsuite/libjava.lang/pr8823.java new file mode 100644 index 000000000..3327ddf7a --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8823.java @@ -0,0 +1,24 @@ +interface I +{ + public void m(); +} + +abstract class A implements I +{ + // But doesn't define m() +} + +public class pr8823 extends A // which means it implements I +{ + public static void main(String[] args) + { + // Defining c as either I or C will work. + A c = new pr8823(); + c.m(); + } + + public void m() + { + System.out.println("Hello World!"); + } +} |