diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-05 08:06:10 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-05 08:06:10 +0000 |
commit | bde5a5618ae061b478786df168aef7ed96d5f156 (patch) | |
tree | 34048d5352e6be8e82ed1774f63d87b534af6a5e /libjava | |
parent | 7ae1133813dccee1034e8558dabadd99bbd0ad52 (diff) | |
download | ppe42-gcc-bde5a5618ae061b478786df168aef7ed96d5f156.tar.gz ppe42-gcc-bde5a5618ae061b478786df168aef7ed96d5f156.zip |
* libjava.lang/override.java: New file.
* libjava.lang/override.out: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59848 138bc75d-0d04-0410-961f-82ee72b054a4
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 98006afe6e7..fa168d8f586 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 00000000000..94bb09cfc0d --- /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 00000000000..b3172d1242f --- /dev/null +++ b/libjava/testsuite/libjava.lang/override.out @@ -0,0 +1,2 @@ +5 +7 |