-
Bug
-
Resolution: Fixed
-
P4
-
21
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 fromJDK-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.
- They are restated in 3 places, risking inconsistencies
- They incorrectly handle arrays of interface types, a bug left over from
- 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.
- relates to
-
JDK-8069130 6.5: Inappropriate use of 'interface type' in aastore, checkcast, instanceof
-
- Closed
-