RFR: 8339296: Record deconstruction pattern in switch fails to compile
Jan Lahoda
jlahoda at openjdk.org
Fri Sep 27 12:30:38 UTC 2024
On Fri, 27 Sep 2024 12:01:39 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> The approach seems good. I left some modelling questions. As you notice, I'm skeptical that just handling unknown types better is going to be the last time we see issues like this. E.g. the switch code in `Attr` seems to be doing way too much when we're in speculative mode.
I don't disagree. I think we need to see if we can move the completeness computation to a later point, and maybe even skip the exhaustiveness check during speculative attribution. But, having a type that crashes the compiler when sent to an innocuous method seemed relatively important to fix.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20990#issuecomment-2379157880
More information about the compiler-dev
mailing list