RFR: 8274347: Passing a *nested* switch expression as a parameter causes an NPE during compile

Jan Lahoda jlahoda at openjdk.java.net
Wed Oct 6 09:14:17 UTC 2021


Switch handling needs to compute if a case's statements complete normally or not (this is used on multiple places later in the pipeline). But, especially during speculative attributions, the tree may not be fully attributed. `preFlow` should be invoked before invoking flow. The patch also fixes binding pattern handling in preFlow/postAttr.

-------------

Commit messages:
 - An additional test, and improving preflow/post-attr.
 - 8274347: Passing a *nested* switch expression as a parameter causes an NPE during compile

Changes: https://git.openjdk.java.net/jdk/pull/5836/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5836&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8274347
  Stats: 88 lines in 3 files changed: 85 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5836.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5836/head:pull/5836

PR: https://git.openjdk.java.net/jdk/pull/5836


More information about the compiler-dev mailing list