inference: lub of typevariables does not yield expected results

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 5.0, 6
    • Component/s: specification
    • Fix Understood
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Imported:
              Indexed: