Access to super default method is missing type name
Marcono1234 opened this issue · 0 comments
Marcono1234 commented
Version
1.1.3+, Commit 7f01508
Description
When calling the default implementation of an implemented interface the access must occur using TypeName.super.methodName()
, simply using super.methodName()
is invalid:
If the form is
super
.[TypeArguments]Identifier [...] It is a compile-time error if T is the classObject
or T is an interface.
However, jd-core does not emit the type name.
Source:
interface SuperMemberAccess {
interface Base {
default void test() { }
}
public static class A implements Base {
@Override
public void test() {
// Must use TypeName.super.methodName()
Base.super.test();
}
}
}
Decompiled output:
interface SuperMemberAccess {
public static interface Base {
default void test() {}
}
public static class A implements Base {
public void test() {
// This is not valid and will not compile
super.test();
}
}
}