mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-02 06:40:25 +08:00
MethodFailure4.java: New file.
2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * libjava.compile/MethodFailure4.java: New file. * libjava.compile/MethodFailure4.out: New file. From-SVN: r33415
This commit is contained in:
parent
424a02db69
commit
dc87bfdef1
@ -1,3 +1,8 @@
|
||||
2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||
|
||||
* libjava.compile/MethodFailure4.java: New file.
|
||||
* libjava.compile/MethodFailure4.out: New file.
|
||||
|
||||
2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||
|
||||
* libjava.compile/block.java: New file.
|
||||
|
40
libjava/testsuite/libjava.compile/MethodFailure4.java
Normal file
40
libjava/testsuite/libjava.compile/MethodFailure4.java
Normal file
@ -0,0 +1,40 @@
|
||||
import java.util.*;
|
||||
|
||||
public class MethodFailure4 {
|
||||
|
||||
public static String call(A obj) {
|
||||
return "A";
|
||||
}
|
||||
public static String call(I obj) {
|
||||
return "I";
|
||||
}
|
||||
|
||||
interface I {}
|
||||
static class A {}
|
||||
static class B extends A implements I {}
|
||||
static class C extends B {}
|
||||
|
||||
|
||||
public static A getA() {
|
||||
return new A();
|
||||
}
|
||||
|
||||
public static B getB() {
|
||||
return new B();
|
||||
}
|
||||
|
||||
public static C getC() {
|
||||
return new C();
|
||||
}
|
||||
|
||||
public static I getI() {
|
||||
return new C();
|
||||
}
|
||||
|
||||
// this method invocation is ambiguous
|
||||
|
||||
public static void main(String[] argv) {
|
||||
call( getC() );
|
||||
}
|
||||
|
||||
}
|
1
libjava/testsuite/libjava.compile/MethodFailure4.xfail
Normal file
1
libjava/testsuite/libjava.compile/MethodFailure4.xfail
Normal file
@ -0,0 +1 @@
|
||||
shouldfail
|
Loading…
x
Reference in New Issue
Block a user