diff options
author | Tom Tromey <tromey@redhat.com> | 2002-12-05 08:06:10 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-12-05 08:06:10 +0000 |
commit | 0c4077f9c7ec677eb1c7270a2be520a9f947c6ab (patch) | |
tree | 34048d5352e6be8e82ed1774f63d87b534af6a5e /libjava | |
parent | eaa2834f9f7aeb81115213fcfb0d2e055afc779e (diff) | |
download | gcc-0c4077f9c7ec677eb1c7270a2be520a9f947c6ab.zip gcc-0c4077f9c7ec677eb1c7270a2be520a9f947c6ab.tar.gz gcc-0c4077f9c7ec677eb1c7270a2be520a9f947c6ab.tar.bz2 |
override.java: New file.
* libjava.lang/override.java: New file.
* libjava.lang/override.out: New file.
From-SVN: r59848
Diffstat (limited to 'libjava')
-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 |