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

Fails to reject bad override of generic method

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: