[AA LC] Fix visibility of fields for const vals
This commit is contained in:
+2
-1
@@ -225,9 +225,10 @@ internal open class SymbolLightClass(
|
|||||||
fun addPropertyBackingField(propertySymbol: KtPropertySymbol) {
|
fun addPropertyBackingField(propertySymbol: KtPropertySymbol) {
|
||||||
val isJvmField = propertySymbol.hasJvmFieldAnnotation()
|
val isJvmField = propertySymbol.hasJvmFieldAnnotation()
|
||||||
val isLateInit = (propertySymbol as? KtKotlinPropertySymbol)?.isLateInit == true
|
val isLateInit = (propertySymbol as? KtKotlinPropertySymbol)?.isLateInit == true
|
||||||
|
val isConst = (propertySymbol as? KtKotlinPropertySymbol)?.isConst == true
|
||||||
|
|
||||||
val forceStatic = classOrObjectSymbol.isObject
|
val forceStatic = classOrObjectSymbol.isObject
|
||||||
val takePropertyVisibility = !isCompanionObject && (isLateInit || isJvmField)
|
val takePropertyVisibility = !isCompanionObject && (isLateInit || isJvmField || isConst)
|
||||||
|
|
||||||
createField(
|
createField(
|
||||||
declaration = propertySymbol,
|
declaration = propertySymbol,
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
public final class A /* pack.A*/ {
|
public final class A /* pack.A*/ {
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
private static final java.lang.String cv = "A" /* initializer type: java.lang.String */;
|
private static java.lang.String v;
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
private static java.lang.String v;
|
public static final java.lang.String cv = "A" /* initializer type: java.lang.String */;
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final pack.A INSTANCE;
|
public static final pack.A INSTANCE;
|
||||||
|
|
||||||
private static final int c;
|
private static final int c;
|
||||||
|
|
||||||
private static final int cc = 1 /* initializer type: int */;
|
public static final int cc = 1 /* initializer type: int */;
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public final java.lang.String getV();// getV()
|
public final java.lang.String getV();// getV()
|
||||||
|
|||||||
@@ -116,23 +116,23 @@ public final class Obj /* Obj*/ implements java.lang.Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class ConstContainer /* ConstContainer*/ {
|
public final class ConstContainer /* ConstContainer*/ {
|
||||||
@org.jetbrains.annotations.NotNull()
|
|
||||||
private static final java.lang.String str = "one" /* initializer type: java.lang.String */;
|
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final ConstContainer INSTANCE;
|
public static final ConstContainer INSTANCE;
|
||||||
|
|
||||||
private static final double complexFloat = 5.118281745910645 /* initializer type: double */;
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static final java.lang.String str = "one" /* initializer type: java.lang.String */;
|
||||||
|
|
||||||
private static final double e = 2.7182818284 /* initializer type: double */;
|
public static final double complexFloat = 5.118281745910645 /* initializer type: double */;
|
||||||
|
|
||||||
private static final float eFloat = 2.7182817f /* initializer type: float */;
|
public static final double e = 2.7182818284 /* initializer type: double */;
|
||||||
|
|
||||||
private static final int one = 1 /* initializer type: int */;
|
public static final float eFloat = 2.7182817f /* initializer type: float */;
|
||||||
|
|
||||||
private static final long complexLong = 2L /* initializer type: long */;
|
public static final int one = 1 /* initializer type: int */;
|
||||||
|
|
||||||
private static final long oneLong = 1L /* initializer type: long */;
|
public static final long complexLong = 2L /* initializer type: long */;
|
||||||
|
|
||||||
|
public static final long oneLong = 1L /* initializer type: long */;
|
||||||
|
|
||||||
private ConstContainer();// .ctor()
|
private ConstContainer();// .ctor()
|
||||||
|
|
||||||
|
|||||||
@@ -8,12 +8,6 @@ public final class Foo /* Foo*/ {
|
|||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
private final java.lang.Object arrayConst;
|
private final java.lang.Object arrayConst;
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
|
||||||
private final java.lang.String CONSTANT_WITH_ESCAPES = "A\tB\nC\rD'E\"F\\G$H" /* initializer type: java.lang.String */;
|
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
|
||||||
private final java.lang.String SUBSYSTEM_DEPRECATED = "This subsystem is deprecated" /* initializer type: java.lang.String */;
|
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
private final kotlin.jvm.functions.Function1<java.lang.Integer, java.lang.Integer> sum;
|
private final kotlin.jvm.functions.Function1<java.lang.Integer, java.lang.Integer> sum;
|
||||||
|
|
||||||
@@ -32,6 +26,12 @@ public final class Foo /* Foo*/ {
|
|||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
private kotlin.Lazy<java.lang.String> lazyProp$delegate;
|
private kotlin.Lazy<java.lang.String> lazyProp$delegate;
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public final java.lang.String CONSTANT_WITH_ESCAPES = "A\tB\nC\rD'E\"F\\G$H" /* initializer type: java.lang.String */;
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public final java.lang.String SUBSYSTEM_DEPRECATED = "This subsystem is deprecated" /* initializer type: java.lang.String */;
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final Foo.Companion Companion;
|
public static final Foo.Companion Companion;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user