The `types` array indices are not the overall field indices but are just indices among reference fields. We need to fix this indice use; this surfaces only when `--enable-preview` and causes failure in `test/jdk/java/io/Serializable/checkModifiers/CheckModifiers.java`.
--------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8386140 Changes: https://git.openjdk.org/valhalla/pull/2525/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2525&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8386140 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/valhalla/pull/2525.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2525/head:pull/2525 PR: https://git.openjdk.org/valhalla/pull/2525
