RFR: JDK-8249261: AssertionError in StructuralStuckChecker
Jan Lahoda
jan.lahoda at oracle.com
Thu Jul 16 12:57:10 UTC 2020
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