Fails to reject bad override of generic method

XMLWordPrintable

    • generic
    • generic

      The compiler fails to reject this program:

      import java.util.*;
      public class X<S> {
            public static <U> X<U> test() {
                  return null;
            }
      }

      class B extends X<Set> {
            public static B test() {
                  return null;
            }
      }

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: