RFR: 8345474: instanceof does not reify the deduced type when patterns are not used in the compilation unit
Aggelos Biboudis
abimpoudis at openjdk.org
Wed Dec 4 10:54:50 UTC 2024
Our tests for #21539 covered the case of using `instanceof` as both a type comparison operator and a pattern matching operator in a single compilation unit. That concealed the fact that the translation is getting triggered only when the compilation unit `hasPatterns`. This was evident/reproducible also by experimentation using jshell. This PR addresses this issue.
-------------
Commit messages:
- 8345474: instanceof does not reify the deduced type when patterns are not used in the compilation unit
Changes: https://git.openjdk.org/jdk/pull/22541/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22541&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8345474
Stats: 57 lines in 2 files changed: 57 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/22541.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22541/head:pull/22541
PR: https://git.openjdk.org/jdk/pull/22541
More information about the compiler-dev
mailing list