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

15.12.1: Identify a "type" to search, not a "class or interface"


    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 5.0, 7, 8
    • Fix Version/s: tbd_major
    • Component/s: specification
    • Labels:


      The first step in resolving a method invocation is to identify a type to search. This is presented in 15.12.1 as a "class or interface" to search, despite the fact that many other types exist in the type system, with member methods of their own (per Chapter 4):

      - A parameterized type or a raw type are not adequately represented with simply a "class or interface" -- the need for substitution/erasure needs to be conveyed

      - An array type has methods, including 'clone' (10.7)

      - A type variable has members that are _not_ the same as its upper bound (see 4.4); for example, private methods are not inherited

      - An intersection type inherits members from a number of supertypes

      Particularly troubling is this incorrect description of how method invocation on a type variable should be handled: "The class or interface to be searched is T if T is a class or interface type, or the upper bound of T if T is a type variable".




            • Assignee:
              dlsmith Dan Smith
              dlsmith Dan Smith
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: