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

inference: lub of typevariables does not yield expected results

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 5.0, 6
    • Fix Version/s: None
    • Component/s: specification
    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      generic
    • OS:
      generic

      Description

      Consider the example in 5042462.

      We have the following type variables:

      <T, U extends T, V extends T>

      The JLS (p463) defines lub in terms of the EST (erased supertype set).

      EST(U) = {Object} and
      EST(V) = {Object}.

      Then EC = { Object } = MEC.

      So lub(U,V) = Object.

      It should be T.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abuckley Alex Buckley
                Reporter:
                ahe Peter Ahe
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: