Fix visibility of $annotations methods
This commit is contained in:
committed by
Space Team
parent
b4004763cc
commit
46844100d5
+10
-2
@@ -19,7 +19,7 @@ import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
|
||||
import org.jetbrains.kotlin.light.classes.symbol.*
|
||||
import org.jetbrains.kotlin.light.classes.symbol.annotations.*
|
||||
import org.jetbrains.kotlin.light.classes.symbol.classes.SymbolLightClassBase
|
||||
import org.jetbrains.kotlin.light.classes.symbol.modifierLists.InitializedModifiersBox
|
||||
import org.jetbrains.kotlin.light.classes.symbol.modifierLists.GranularModifiersBox
|
||||
import org.jetbrains.kotlin.light.classes.symbol.modifierLists.SymbolLightMemberModifierList
|
||||
import org.jetbrains.kotlin.light.classes.symbol.parameters.SymbolLightParameterForReceiver
|
||||
import org.jetbrains.kotlin.light.classes.symbol.parameters.SymbolLightParameterList
|
||||
@@ -80,7 +80,15 @@ internal class SymbolLightAnnotationsMethod private constructor(
|
||||
return@lazyPub containingPropertySymbolPointer.withSymbol(ktModule) { propertySymbol ->
|
||||
SymbolLightMemberModifierList(
|
||||
containingDeclaration = this@SymbolLightAnnotationsMethod,
|
||||
modifiersBox = InitializedModifiersBox(PsiModifier.PUBLIC, PsiModifier.STATIC),
|
||||
modifiersBox = GranularModifiersBox(mapOf(PsiModifier.STATIC to true)) { modifier ->
|
||||
when (modifier) {
|
||||
in GranularModifiersBox.VISIBILITY_MODIFIERS -> GranularModifiersBox.computeVisibilityForMember(
|
||||
ktModule,
|
||||
containingPropertySymbolPointer,
|
||||
)
|
||||
else -> null
|
||||
}
|
||||
},
|
||||
annotationsBox = GranularAnnotationsBox(
|
||||
annotationsProvider = SymbolAnnotationsProvider(
|
||||
ktModule = ktModule,
|
||||
|
||||
+18
@@ -35,6 +35,24 @@ public static final class Companion /* C.Companion*/ {
|
||||
public final int getY();// getY()
|
||||
}
|
||||
|
||||
public class O /* O*/ {
|
||||
private final int protectedProperty = 1 /* initializer type: int */;
|
||||
|
||||
@Anno(p = "private")
|
||||
@java.lang.Deprecated()
|
||||
private static void getPrivateProperty$annotations();// getPrivateProperty$annotations()
|
||||
|
||||
@Anno(p = "protected")
|
||||
@java.lang.Deprecated()
|
||||
protected static void getProtectedProperty$annotations();// getProtectedProperty$annotations()
|
||||
|
||||
private final int getPrivateProperty();// getPrivateProperty()
|
||||
|
||||
protected final int getProtectedProperty();// getProtectedProperty()
|
||||
|
||||
public O();// .ctor()
|
||||
}
|
||||
|
||||
public final class PropertyAnnotationsKt /* PropertyAnnotationsKt*/ {
|
||||
@kotlin.jvm.Transient()
|
||||
@kotlin.jvm.Volatile()
|
||||
|
||||
+10
@@ -26,6 +26,16 @@ public static final class Companion /* C.Companion*/ {
|
||||
public final int getY();// getY()
|
||||
}
|
||||
|
||||
public class O /* O*/ {
|
||||
private final int protectedProperty;
|
||||
|
||||
private final int getPrivateProperty();// getPrivateProperty()
|
||||
|
||||
protected final int getProtectedProperty();// getProtectedProperty()
|
||||
|
||||
public O();// .ctor()
|
||||
}
|
||||
|
||||
public final class PropertyAnnotationsKt /* PropertyAnnotationsKt*/ {
|
||||
@kotlin.jvm.Transient()
|
||||
@kotlin.jvm.Volatile()
|
||||
|
||||
+9
-1
@@ -29,4 +29,12 @@ val <T: Any> @receiver:Anno("receiver") List<T>.extensionProperty: Int
|
||||
val nullable: String? = null
|
||||
|
||||
@Anno("nonNullable")
|
||||
val nonNullable: String = ""
|
||||
val nonNullable: String = ""
|
||||
|
||||
open class O {
|
||||
@Anno("private")
|
||||
private val privateProperty: Int get() = 1
|
||||
|
||||
@Anno("protected")
|
||||
protected val protectedProperty = 1
|
||||
}
|
||||
+10
@@ -26,6 +26,16 @@ public static final class Companion /* C.Companion*/ {
|
||||
public final int getY();// getY()
|
||||
}
|
||||
|
||||
public class O /* O*/ {
|
||||
private final int protectedProperty;
|
||||
|
||||
private final int getPrivateProperty();// getPrivateProperty()
|
||||
|
||||
protected final int getProtectedProperty();// getProtectedProperty()
|
||||
|
||||
public O();// .ctor()
|
||||
}
|
||||
|
||||
public final class PropertyAnnotationsKt /* PropertyAnnotationsKt*/ {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private static final java.lang.String nonNullable;
|
||||
|
||||
Reference in New Issue
Block a user