diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/AsmUtil.java b/compiler/backend/src/org/jetbrains/jet/codegen/AsmUtil.java index 9da46197f5d..4fec1a31481 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/AsmUtil.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/AsmUtil.java @@ -62,7 +62,7 @@ public class AsmUtil { ); private static final int NO_FLAG_LOCAL = 0; - private static final int NO_FLAG_PACKAGE_PRIVATE = 0; + public static final int NO_FLAG_PACKAGE_PRIVATE = 0; @NotNull private static final Map visibilityToAccessFlag = ImmutableMap.builder() diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/ClosureCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/ClosureCodegen.java index 304ab35bd8d..073b8213b23 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/ClosureCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/ClosureCodegen.java @@ -101,7 +101,7 @@ public class ClosureCodegen extends GenerationStateAware { : new String[] {JvmClassName.byClassDescriptor(samInterface).getInternalName()}; cv.defineClass(fun, V1_6, - ACC_PUBLIC | ACC_FINAL/*|ACC_SUPER*/, + ACC_FINAL, name.getInternalName(), null, superclass.getInternalName(), @@ -127,10 +127,10 @@ public class ClosureCodegen extends GenerationStateAware { } private void generateConstInstance(PsiElement fun, ClassBuilder cv) { - MethodVisitor mv = cv.newMethod(fun, ACC_PUBLIC | ACC_STATIC | ACC_SYNTHETIC, "", "()V", null, new String[0]); + MethodVisitor mv = cv.newMethod(fun, ACC_STATIC | ACC_SYNTHETIC, "", "()V", null, new String[0]); InstructionAdapter iv = new InstructionAdapter(mv); - cv.newField(fun, ACC_PUBLIC | ACC_STATIC | ACC_FINAL, JvmAbi.INSTANCE_FIELD, name.getDescriptor(), null, null); + cv.newField(fun, ACC_STATIC | ACC_FINAL, JvmAbi.INSTANCE_FIELD, name.getDescriptor(), null, null); if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) { genStubCode(mv); @@ -222,7 +222,7 @@ public class ClosureCodegen extends GenerationStateAware { Type[] argTypes = fieldListToTypeArray(args); Method constructor = new Method("", Type.VOID_TYPE, argTypes); - MethodVisitor mv = cv.newMethod(fun, ACC_PUBLIC, "", constructor.getDescriptor(), null, new String[0]); + MethodVisitor mv = cv.newMethod(fun, NO_FLAG_PACKAGE_PRIVATE, "", constructor.getDescriptor(), null, new String[0]); if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) { genStubCode(mv); }