From dc87bfdef1039472e4fc961bcba84e887780ad93 Mon Sep 17 00:00:00 2001 From: Alexandre Petit-Bianco Date: Tue, 25 Apr 2000 15:04:48 +0000 Subject: MethodFailure4.java: New file. 2000-04-25 Alexandre Petit-Bianco * libjava.compile/MethodFailure4.java: New file. * libjava.compile/MethodFailure4.out: New file. From-SVN: r33415 --- .../testsuite/libjava.compile/MethodFailure4.java | 40 ++++++++++++++++++++++ .../testsuite/libjava.compile/MethodFailure4.xfail | 1 + 2 files changed, 41 insertions(+) create mode 100644 libjava/testsuite/libjava.compile/MethodFailure4.java create mode 100644 libjava/testsuite/libjava.compile/MethodFailure4.xfail (limited to 'libjava/testsuite/libjava.compile') 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 -- cgit v1.1