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

inference: lub of typevariables does not yield expected results

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 5.0, 6
    • 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.

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

              Created:
              Updated:
              Imported:
              Indexed: