Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6557199

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

            mcimadamore Maurizio Cimadamore
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: