4.5.1: Clarify that ? <= ? extends Object

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 8
    • Component/s: specification

      Per JDK-6480391 and its update to 4.5.1, "The wildcard ? extends Object is equivalent to the unbounded wildcard ?"

      This is a subtle point and easy to overlook in a system that represents these two wildcards differently, so JDK-6480391 also added the following rules for type argument containment:
      ? extends T <= ?
      ? super T <= ? extends Object

      Another rule should be added, also for clarity:
      ***? <= ? extends Object***

      (Note that 18.2.3 already includes a similar rule for inference involving type argument containment.)

            Assignee:
            Dan Smith
            Reporter:
            Dan Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: