Don't generate annotations on $default methods

#KT-29965 Fixed
This commit is contained in:
Mikhael Bogdanov
2019-02-18 14:16:49 +01:00
parent a020170a92
commit 3b57ceeafe
7 changed files with 31 additions and 31 deletions
@@ -1208,10 +1208,6 @@ public class FunctionCodegen {
getThrownExceptions(functionDescriptor, typeMapper)
);
// Only method annotations are copied to the $default method. Parameter annotations are not copied until there are valid use cases;
// enum constructors have two additional synthetic parameters which somewhat complicate this task
AnnotationCodegen.forMethod(mv, memberCodegen, state).genAnnotations(functionDescriptor, defaultMethod.getReturnType());
if (!state.getClassBuilderMode().generateBodies) {
if (this.owner instanceof MultifileClassFacadeContext)
endVisit(mv, "default method delegation", getSourceFromDescriptor(functionDescriptor));