// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class GFun {
    public static class GP {
    }
    public static class GC extends GP {
    }
    public static interface I3I<T> {
        public void mi(T o);
    }
    public static interface I3O<T>
    {
        public T mo();
    }
    public static class G3I<T> implements I3I<T> {
        public void mi(T o) { }
    }
    public static  class G3O<T> implements I3O<T> {
        public T mo() { return null; }
    }
    public static <T> void f3i(Class<T> clz, I3I<? super T> o) {
    }
    public static <T> void f3o(Class<T> clz, I3O<? extends T> o) {
    }
    public static void main(String[] args) {
        f3i(GP.class, new G3I<GP>());
        //f3i(GP.class, new G3I<GC>());
        f3i(GC.class, new G3I<GP>());
        f3i(GC.class, new G3I<GC>());
        f3o(GP.class, new G3O<GP>());
        f3o(GP.class, new G3O<GC>());
        //f3o(GC.class, new G3O<GP>());
        f3o(GC.class, new G3O<GC>());
    }
}
