RFR: 8200145: Conditional expression mistakenly treated as standalone
Guoxiong Li
github.com+13688759+lgxbslgx at openjdk.java.net
Sat Apr 17 04:13:36 UTC 2021
On Fri, 16 Apr 2021 17:26:24 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> (I am not an expert on types, so I may be wrong.)
>>
>> This method seems to return either the primitive type for which `t` is a box, or `noType`. So returning a `noType` for erroneous type seems reasonable to me. Basically, it would mean that an erroneous type is not a box for any type, which seems sensible. (Currently, every erroneous type is seen as the box for the first primitive type in the sequence, which I think is `byte`.)
>>
>> I agree only one of these two changes is needed, although I'd personally probably try to go with the one here, in `unboxedType`, as it seems like a generally desirable behavior to me. I agree it can have effects on other parts of the code, though, so it has more potential to break something.
>
> I'm ok with going for the proposed fix, as long as tests are ok. Approving.
Yes, this is not necessary if we only solve this bug. But it is useful logically. And all the related tests passed locally and passed at the `Pre-submit tests`. So I think it is good to remain it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2324
More information about the compiler-dev
mailing list