This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Patch: regression from Alex
- To: Java Patch List <java-patches at sourceware dot cygnus dot com>
- Subject: Patch: regression from Alex
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 25 Apr 2000 09:08:08 -0600
- Reply-To: tromey at cygnus dot com
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