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

javac should take multiple upper bounds into account in incorporation

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b13

      Backports

        Description

        This code:

        interface Task<E extends Exception> {}
        class Comparator<T> {}
        class CustomException extends Exception {}

        class TaskQueue<E extends Exception, T extends Task<E>> {}

        abstract class Test {
            abstract <E extends Exception, T extends Task<E>> TaskQueue<E, T> create(Comparator<? super T> comparator);

            void f(Comparator<Task<CustomException>> comp) {
                TaskQueue<CustomException, Task<CustomException>> queue = create(comp);
            }
        }

        compiles in 6 and 7 but fails to compile in 8.

        Reported on lambda-dev: http://mail.openjdk.java.net/pipermail/lambda-dev/2013-November/011442.html

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                vromero Vicente Arturo Romero Zaldivar
                Reporter:
                vromero Vicente Arturo Romero Zaldivar
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: