diff options
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/testsuite/libjava.compile/MethodFailure4.java | 40 | ||||
-rw-r--r-- | libjava/testsuite/libjava.compile/MethodFailure4.xfail | 1 |
3 files changed, 46 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index 54a39c4..5119c6b 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -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. diff --git a/libjava/testsuite/libjava.compile/MethodFailure4.java b/libjava/testsuite/libjava.compile/MethodFailure4.java new file mode 100644 index 0000000..bed3a0e --- /dev/null +++ b/libjava/testsuite/libjava.compile/MethodFailure4.java @@ -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() ); + } + +} diff --git a/libjava/testsuite/libjava.compile/MethodFailure4.xfail b/libjava/testsuite/libjava.compile/MethodFailure4.xfail new file mode 100644 index 0000000..e3b083b --- /dev/null +++ b/libjava/testsuite/libjava.compile/MethodFailure4.xfail @@ -0,0 +1 @@ +shouldfail |