override.java: New file.
* libjava.lang/override.java: New file. * libjava.lang/override.out: New file. From-SVN: r59848
This commit is contained in:
parent
eaa2834f9f
commit
0c4077f9c7
@ -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>
|
2002-12-01 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* libjava.jacks/jacks.exp (gcj_jacks_setup_xfail): New function.
|
* libjava.jacks/jacks.exp (gcj_jacks_setup_xfail): New function.
|
||||||
|
19
libjava/testsuite/libjava.lang/override.java
Normal file
19
libjava/testsuite/libjava.lang/override.java
Normal file
@ -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());
|
||||||
|
}
|
||||||
|
}
|
2
libjava/testsuite/libjava.lang/override.out
Normal file
2
libjava/testsuite/libjava.lang/override.out
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
5
|
||||||
|
7
|
Loading…
x
Reference in New Issue
Block a user