diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/FunctionCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/FunctionCodegen.java index 9f41c5bb90e..8f9b0ac2869 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/FunctionCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/FunctionCodegen.java @@ -119,12 +119,13 @@ public class FunctionCodegen extends ParentCodegenAwareImpl { } AnnotationCodegen.forMethod(mv, typeMapper).genAnnotations(functionDescriptor); - if (state.getClassBuilderMode() == ClassBuilderMode.LIGHT_CLASSES) return; generateParameterAnnotations(functionDescriptor, mv, jvmSignature); generateJetValueParameterAnnotations(mv, functionDescriptor, jvmSignature); + if (state.getClassBuilderMode() == ClassBuilderMode.LIGHT_CLASSES) return; + if (isAbstractMethod(functionDescriptor, methodContext.getContextKind())) return; generateMethodBody(mv, functionDescriptor, methodContext, jvmSignature, strategy); @@ -210,7 +211,10 @@ public class FunctionCodegen extends ParentCodegenAwareImpl { } } - private static void markEnumConstructorParameterAsSynthetic(MethodVisitor mv, int i) { + private void markEnumConstructorParameterAsSynthetic(MethodVisitor mv, int i) { + // IDEA's ClsPsi builder fails to annotate synthetic parameters + if (state.getClassBuilderMode() == ClassBuilderMode.LIGHT_CLASSES) return; + // This is needed to avoid RuntimeInvisibleParameterAnnotations error in javac: // see MethodWriter.visitParameterAnnotation()