[AA LC] Fix visibility of fields from companion objects
^KTIJ-22541
This commit is contained in:
+5
-2
@@ -135,7 +135,7 @@ internal abstract class SymbolLightClassForClassOrObject(
|
||||
getDeclaredMemberScope().getCallableSymbols()
|
||||
.filterIsInstance<KtPropertySymbol>()
|
||||
.applyIf(isInterface) {
|
||||
filter { it.hasJvmFieldAnnotation() || it.isConst }
|
||||
filter { it.isConstOrJvmField }
|
||||
}
|
||||
.mapTo(result) {
|
||||
SymbolLightFieldForProperty(
|
||||
@@ -145,12 +145,15 @@ internal abstract class SymbolLightClassForClassOrObject(
|
||||
lightMemberOrigin = null,
|
||||
isTopLevel = false,
|
||||
forceStatic = true,
|
||||
takePropertyVisibility = true
|
||||
takePropertyVisibility = it.isConstOrJvmField
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val KtPropertySymbol.isConstOrJvmField: Boolean
|
||||
get() = isConst || hasJvmFieldAnnotation()
|
||||
|
||||
private val KtPropertySymbol.isConst: Boolean
|
||||
get() = (this as? KtKotlinPropertySymbol)?.isConst == true
|
||||
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
public final class ClassObjectField /* ClassObjectField*/ {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final ClassObjectField.Companion Companion;
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private static final java.lang.String y;
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public static final java.lang.String x;
|
||||
|
||||
public ClassObjectField();// .ctor()
|
||||
|
||||
|
||||
public static final class Companion /* ClassObjectField.Companion*/ {
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public final java.lang.String getX();// getX()
|
||||
|
||||
private Companion();// .ctor()
|
||||
|
||||
}}
|
||||
@@ -1,17 +1,17 @@
|
||||
public final class C /* C*/ {
|
||||
@kotlin.jvm.JvmStatic()
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static java.lang.String x;
|
||||
private static java.lang.String x;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private static java.lang.String c1;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private static java.lang.String c;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final C.Companion Companion;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static java.lang.String c1;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static java.lang.String c;
|
||||
|
||||
@kotlin.jvm.JvmStatic()
|
||||
public static final void foo();// foo()
|
||||
|
||||
|
||||
@@ -74,18 +74,18 @@ public final class Foo /* Foo*/ {
|
||||
|
||||
private static final error.NonExistentClass contextBean;
|
||||
|
||||
private static final int f1;
|
||||
|
||||
private static final int prop3;
|
||||
|
||||
private static int prop7;
|
||||
|
||||
protected java.lang.String protectedLateinitVar;
|
||||
|
||||
public error.NonExistentClass subject;
|
||||
|
||||
public java.lang.String internalVarPrivateSet;
|
||||
|
||||
public static final int f1;
|
||||
|
||||
public static final int prop3;
|
||||
|
||||
public static int prop7;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
protected final java.lang.String getProtectedLateinitVar();// getProtectedLateinitVar()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user