Rename private constants in CodegenUtil in order not be confused with asm real flags.
This commit is contained in:
@@ -55,8 +55,8 @@ public class CodegenUtil {
|
|||||||
public static final String RECEIVER$0 = "receiver$0";
|
public static final String RECEIVER$0 = "receiver$0";
|
||||||
public static final String THIS$0 = "this$0";
|
public static final String THIS$0 = "this$0";
|
||||||
|
|
||||||
private static final int ACC_LOCAL = 0;
|
private static final int NO_FLAG_LOCAL = 0;
|
||||||
private static final int ACC_PACKAGE_PRIVATE = 0;
|
private static final int NO_FLAG_PACKAGE_PRIVATE = 0;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static final Map<Visibility, Integer> visibilityToAccessFlag = ImmutableMap.<Visibility, Integer>builder()
|
private static final Map<Visibility, Integer> visibilityToAccessFlag = ImmutableMap.<Visibility, Integer>builder()
|
||||||
@@ -64,7 +64,7 @@ public class CodegenUtil {
|
|||||||
.put(Visibilities.PROTECTED, ACC_PROTECTED)
|
.put(Visibilities.PROTECTED, ACC_PROTECTED)
|
||||||
.put(Visibilities.PUBLIC, ACC_PUBLIC)
|
.put(Visibilities.PUBLIC, ACC_PUBLIC)
|
||||||
.put(Visibilities.INTERNAL, ACC_PUBLIC)
|
.put(Visibilities.INTERNAL, ACC_PUBLIC)
|
||||||
.put(Visibilities.LOCAL, ACC_LOCAL)
|
.put(Visibilities.LOCAL, NO_FLAG_LOCAL)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
private CodegenUtil() {
|
private CodegenUtil() {
|
||||||
@@ -267,17 +267,17 @@ public class CodegenUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (isClassObject(containingDeclaration)) {
|
if (isClassObject(containingDeclaration)) {
|
||||||
return ACC_PACKAGE_PRIVATE;
|
return NO_FLAG_PACKAGE_PRIVATE;
|
||||||
}
|
}
|
||||||
if (memberDescriptor instanceof ConstructorDescriptor) {
|
if (memberDescriptor instanceof ConstructorDescriptor) {
|
||||||
ClassKind kind = ((ClassDescriptor) containingDeclaration).getKind();
|
ClassKind kind = ((ClassDescriptor) containingDeclaration).getKind();
|
||||||
if (kind == ClassKind.OBJECT) {
|
if (kind == ClassKind.OBJECT) {
|
||||||
//TODO: should be ACC_PACKAGE_PRIVATE
|
//TODO: should be NO_FLAG_PACKAGE_PRIVATE
|
||||||
// see http://youtrack.jetbrains.com/issue/KT-2700
|
// see http://youtrack.jetbrains.com/issue/KT-2700
|
||||||
return ACC_PUBLIC;
|
return ACC_PUBLIC;
|
||||||
}
|
}
|
||||||
else if (kind == ClassKind.ENUM_ENTRY) {
|
else if (kind == ClassKind.ENUM_ENTRY) {
|
||||||
return ACC_PACKAGE_PRIVATE;
|
return NO_FLAG_PACKAGE_PRIVATE;
|
||||||
}
|
}
|
||||||
else if (kind == ClassKind.ENUM_CLASS) {
|
else if (kind == ClassKind.ENUM_CLASS) {
|
||||||
//TODO: should be ACC_PRIVATE
|
//TODO: should be ACC_PRIVATE
|
||||||
|
|||||||
Reference in New Issue
Block a user