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

Spurious error in type containment involving arrays of wildcard parameterized types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 9
    • 9
    • tools

      This program:

      import java.util.List;

      class Test {
          public static void event(List<? super String>[] conditions) {
              allOf(conditions);
          }

          public static <T> void allOf(List<? super T>[] conditions) {
          }
      }

      Fails to compile; however, if array brackets are omitted from the source, it compiles w/o issues.

            vromero Vicente Arturo Romero Zaldivar
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: