Integrated: 8259235: javac crashes while attributing super method invocation
Jan Lahoda
jlahoda at openjdk.java.net
Wed Mar 3 12:41:56 UTC 2021
On Tue, 5 Jan 2021 16:47:26 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> Code like:
> public class SuperMethodCallBroken extends Undef implements I {
> public void test() {
> I.super.test();
> }
> }
> interface I {
> public default void test() {}
> }
>
> crashes javac. The reason is that when `I.super` is being attributed, the interfaces of the enclosing class are pruned to remove subtypes - but `Undef` is erroneous and is a subtype of every type. So `I` is removed from the list of interfaces to check, and javac crashes then.
>
> The proposed fix is to ignore erroneous supertypes when looking for subtypes.
This pull request has now been integrated.
Changeset: 6d3c858c
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/6d3c858c
Stats: 18 lines in 3 files changed: 17 ins; 0 del; 1 mod
8259235: javac crashes while attributing super method invocation
Reviewed-by: vromero
-------------
PR: https://git.openjdk.java.net/jdk/pull/1945
More information about the compiler-dev
mailing list