Artifact [1163a92f3b]
Not logged in

Artifact 1163a92f3b52d5e3c3112d75a70ebf04857424e1:


/*
 * MethodFailure3.java --
 *
 * tcljava/tests/signature/MethodFailure3.java
 *
 * Copyright (c) 1998 by Moses DeJong
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: MethodFailure3.java,v 1.2 2002/12/27 14:33:20 mdejong Exp $
 *
 */

package tests.signature;

import java.util.*;

public class MethodFailure3 {

  public static String call(A obj) {
    return "A";
  }
  public static String call(I obj) {
    return "I";
  }


  // this method invocation is ambiguous
  // call( getC() );

  
  public static interface I {}
  public static class A {}
  public static class B extends A {}
  public static class C extends B implements I {}



  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();
  }

}