RFR: 8254286: Wrong inference in switch expression with "null" arm
Jan Lahoda
jlahoda at openjdk.java.net
Mon Oct 12 10:40:09 UTC 2020
On Mon, 12 Oct 2020 10:25:33 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> The fix looks fine. Note that in method inference we also skip the erroneous case:
>
> ```
> @Override
> public boolean accepts(Type t) {
> return !t.isErroneous() && !inferenceContext.free(t) &&
> !t.hasTag(BOT);
> }
> ```
>
> Not sure whether this applies here too - maybe erroneous types are already skipped earlier?
Right - I believe errors are handled by the preceding conditions in condType.
-------------
PR: https://git.openjdk.java.net/jdk/pull/583
More information about the compiler-dev
mailing list