[AA LC] Generate backing field for inline classes
This commit is contained in:
+1
-1
@@ -209,7 +209,7 @@ internal open class SymbolLightClass(
|
|||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addPropertyBackingFields(result: MutableList<KtLightField>) {
|
protected fun addPropertyBackingFields(result: MutableList<KtLightField>) {
|
||||||
val propertySymbols = classOrObjectSymbol.getDeclaredMemberScope().getCallableSymbols()
|
val propertySymbols = classOrObjectSymbol.getDeclaredMemberScope().getCallableSymbols()
|
||||||
.filterIsInstance<KtPropertySymbol>()
|
.filterIsInstance<KtPropertySymbol>()
|
||||||
.applyIf(isCompanionObject) {
|
.applyIf(isCompanionObject) {
|
||||||
|
|||||||
+7
-1
@@ -57,9 +57,15 @@ internal class SymbolLightInlineClass(
|
|||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private val _ownFields: List<KtLightField> by lazyPub {
|
||||||
|
mutableListOf<KtLightField>().apply {
|
||||||
|
addPropertyBackingFields(this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun getOwnMethods(): List<PsiMethod> = _ownMethods
|
override fun getOwnMethods(): List<PsiMethod> = _ownMethods
|
||||||
|
|
||||||
override fun getOwnFields(): List<KtLightField> = emptyList()
|
override fun getOwnFields(): List<KtLightField> = _ownFields
|
||||||
|
|
||||||
override fun copy(): SymbolLightInlineClass = SymbolLightInlineClass(classOrObjectSymbol, manager)
|
override fun copy(): SymbolLightInlineClass = SymbolLightInlineClass(classOrObjectSymbol, manager)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
public final class UInt /* UInt*/ {
|
||||||
|
private final int value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Foo /* Foo*/ {
|
||||||
|
;
|
||||||
|
|
||||||
|
private final int x;
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static Foo valueOf(@org.jetbrains.annotations.NotNull() java.lang.String) throws java.lang.IllegalArgumentException;// valueOf(java.lang.String)
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
public static Foo[] values();// values()
|
||||||
|
|
||||||
|
public final int getX();// getX()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class InlinedDelegate /* InlinedDelegate*/<T> {
|
||||||
|
private T node;
|
||||||
|
|
||||||
|
public final T getNode();// getNode()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class InlineInheritance /* InlineInheritance*/ {
|
||||||
|
private final int v;
|
||||||
|
|
||||||
|
public final int getV();// getV()
|
||||||
|
|
||||||
|
public int getX();// getX()
|
||||||
|
|
||||||
|
public int y();// y()
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user