RFR: JDK-8249261: AssertionError in StructuralStuckChecker

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Jul 16 13:20:26 UTC 2020


This is a fine fix, I'd suggest adding a comment which explains the need 
for the override (e.g. skip over condition) or it might look cryptic in 
few months.

No need for another review.

Maurizio

On 16/07/2020 13:57, Jan Lahoda wrote:
> Hi,
>
> For (erroneous) code like:
> p(T::t ? 1 : 0);
>
> there is a failed assert in 
> DeferredAttr.DeferredAttrNode.StructuralStuckChecker.visitReference:
> Assert.checkNonNull(tree.getOverloadKind());
>
> The given JCMemberReference (for "T::t") does not have an overload 
> kind set. This is because it never goes through ArgumentAttr, as the 
> target type is known.
>
> I suspect a reasonable solution is for the StructuralStuckChecker to 
> not run on conditions in the conditional expression, which is what the 
> proposed patch is doing. But ideas for a better solution are welcome.
>
> Proposed patch:
> http://cr.openjdk.java.net/~jlahoda/8249261/webrev.00/index.html
>
> JBS:
> https://bugs.openjdk.java.net/browse/JDK-8249261
>
> What do you think?
>
> Thanks,
>     Jan


More information about the compiler-dev mailing list