diff options
-rw-r--r-- | libjava/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/override.java | 19 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/override.out | 2 |
3 files changed, 26 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index 98006af..fa168d8 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-12-05 Tom Tromey <tromey@redhat.com> + + * libjava.lang/override.java: New file. + * libjava.lang/override.out: New file. + 2002-12-01 Tom Tromey <tromey@redhat.com> * libjava.jacks/jacks.exp (gcj_jacks_setup_xfail): New function. diff --git a/libjava/testsuite/libjava.lang/override.java b/libjava/testsuite/libjava.lang/override.java new file mode 100644 index 0000000..94bb09c --- /dev/null +++ b/libjava/testsuite/libjava.lang/override.java @@ -0,0 +1,19 @@ +// Regression test that overrides a virtual method with a final one. + +class override1 +{ + public int x1 () { return 3; } +} + +public class override extends override1 +{ + public final int x1() { return 5; } + public final int x2() { return 7; } + + public static void main(String[] args) + { + override z = new override(); + System.out.println(z.x1()); + System.out.println(z.x2()); + } +} diff --git a/libjava/testsuite/libjava.lang/override.out b/libjava/testsuite/libjava.lang/override.out new file mode 100644 index 0000000..b3172d1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/override.out @@ -0,0 +1,2 @@ +5 +7 |