Patch: regression from Alex

Tom Tromey tromey@cygnus.com
Tue Apr 25 08:04:00 GMT 2000


I'm checking in this test case.
It is another compiler regression test from Alex.

2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* libjava.compile/MethodFailure4.java: New file.
	* libjava.compile/MethodFailure4.out: New file.


Tom

Index: libjava.compile/MethodFailure4.java
===================================================================
RCS file: MethodFailure4.java
diff -N MethodFailure4.java
--- /dev/null	Tue May  5 13:32:27 1998
+++ MethodFailure4.java	Tue Apr 25 08:03:03 2000
@@ -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() );
+  }
+
+}
Index: libjava.compile/MethodFailure4.xfail
===================================================================
RCS file: MethodFailure4.xfail
diff -N MethodFailure4.xfail
--- /dev/null	Tue May  5 13:32:27 1998
+++ MethodFailure4.xfail	Tue Apr 25 08:03:03 2000
@@ -0,0 +1 @@
+shouldfail


More information about the Java-patches mailing list