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

15.20.2: Type Comparison instanceof operator refers to "checked cast compatible" which is not defined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 24
    • None
    • specification

      15.20.2 includes the following check on instances of the type comparison operator:

      "The RelationalExpression must be checked cast compatible with the ReferenceType (§5.5), or a compile-time error occurs."

      The "checked cast compatible" definition has been removed from 5.5.

      SOLUTION:

      1. Either add the definition back into 5.5; or
      2. Change the rule from using "checked cast compatible" to "testing conversion"

      Solution 2 is preferable as it lays the groundwork better for adding primitive type patterns.

            gbierman Gavin Bierman
            gbierman Gavin Bierman
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: