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

checkcast, instanceof, aastore: unify dynamic subtyping rules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 21
    • specification
    • vm

      The 'checkcast', 'instanceof', and 'aastore' operations are built on the same dynamic subtyping rules. As currently specified, these rules have a few problems:

      - They are restated in 3 places, risking inconsistencies

      - They incorrectly handle arrays of interface types, a bug left over from JDK-8069130

      - They depend on the JLS to define array supertypes, and sometimes appeal to "assignment compatibility"

      The rules could be improved by centralizing them in one place, removing the Java language dependencies, and properly specifying the treatment of array types.

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

              Created:
              Updated:
              Resolved: