[FIR] Replace FIR tree with generated implementation
This commit is contained in:
@@ -22,10 +22,8 @@ import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirClassLikeDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.declarations.classId
|
||||
import org.jetbrains.kotlin.fir.declarations.superConeTypes
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.resolve.FirProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.directExpansionType
|
||||
import org.jetbrains.kotlin.fir.resolve.firProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
@@ -96,7 +94,7 @@ class FirJavaElementFinder(
|
||||
firClass.typeParameters.map { Pair(it.name.asString(), arrayOf(CommonClassNames.JAVA_LANG_OBJECT)) }
|
||||
)
|
||||
|
||||
if (firClass.supertypesComputationStatus != FirClassLikeDeclaration.SupertypesComputationStatus.COMPUTED) {
|
||||
if (firClass.supertypesComputationStatus != SupertypesComputationStatus.COMPUTED) {
|
||||
val firForSuperClassFile = firProvider.getFirClassifierContainerFile(classId)
|
||||
FirSupertypeResolverTransformer().apply {
|
||||
initFromFile(firForSuperClassFile)
|
||||
@@ -137,7 +135,7 @@ private fun FirRegularClass.packFlags(): Int {
|
||||
}
|
||||
|
||||
private fun PsiClassStubImpl<*>.addSupertypesReferencesLists(firRegularClass: FirRegularClass, session: FirSession) {
|
||||
if (firRegularClass.supertypesComputationStatus == FirClassLikeDeclaration.SupertypesComputationStatus.COMPUTING) return
|
||||
if (firRegularClass.supertypesComputationStatus == SupertypesComputationStatus.COMPUTING) return
|
||||
require(firRegularClass.superTypeRefs.all { it is FirResolvedTypeRef }) {
|
||||
"Supertypes for light class $qualifiedName are being added too early"
|
||||
}
|
||||
|
||||
@@ -22,10 +22,8 @@ import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirClassLikeDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.declarations.classId
|
||||
import org.jetbrains.kotlin.fir.declarations.superConeTypes
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.resolve.FirProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.directExpansionType
|
||||
import org.jetbrains.kotlin.fir.resolve.firProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
@@ -96,7 +94,7 @@ class FirJavaElementFinder(
|
||||
firClass.typeParameters.map { Pair(it.name.asString(), arrayOf(CommonClassNames.JAVA_LANG_OBJECT)) }
|
||||
)
|
||||
|
||||
if (firClass.supertypesComputationStatus != FirClassLikeDeclaration.SupertypesComputationStatus.COMPUTED) {
|
||||
if (firClass.supertypesComputationStatus != SupertypesComputationStatus.COMPUTED) {
|
||||
val firForSuperClassFile = firProvider.getFirClassifierContainerFile(classId)
|
||||
FirSupertypeResolverTransformer().apply {
|
||||
initFromFile(firForSuperClassFile)
|
||||
@@ -137,7 +135,7 @@ private fun FirRegularClass.packFlags(): Int {
|
||||
}
|
||||
|
||||
private fun PsiClassStubImpl<*>.addSupertypesReferencesLists(firRegularClass: FirRegularClass, session: FirSession) {
|
||||
if (firRegularClass.supertypesComputationStatus == FirClassLikeDeclaration.SupertypesComputationStatus.COMPUTING) return
|
||||
if (firRegularClass.supertypesComputationStatus == SupertypesComputationStatus.COMPUTING) return
|
||||
require(firRegularClass.superTypeRefs.all { it is FirResolvedTypeRef }) {
|
||||
"Supertypes for light class $qualifiedName are being added too early"
|
||||
}
|
||||
|
||||
@@ -9,12 +9,15 @@ import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||
import org.jetbrains.kotlin.fir.declarations.addDefaultBoundIfNecessary
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirTypeParameterImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.addDefaultBoundIfNecessary
|
||||
import org.jetbrains.kotlin.fir.declarations.visibility
|
||||
import org.jetbrains.kotlin.fir.java.declarations.FirJavaClass
|
||||
import org.jetbrains.kotlin.fir.java.declarations.FirJavaConstructor
|
||||
import org.jetbrains.kotlin.fir.java.declarations.FirJavaField
|
||||
@@ -116,7 +119,14 @@ class JavaSymbolProvider(
|
||||
val stored = javaTypeParameterStack.safeGet(this)
|
||||
if (stored != null) return stored.fir
|
||||
val firSymbol = FirTypeParameterSymbol()
|
||||
val result = FirTypeParameterImpl(session, null, firSymbol, name, variance = INVARIANT, isReified = false)
|
||||
val result = FirTypeParameterImpl(
|
||||
null,
|
||||
session,
|
||||
name,
|
||||
firSymbol,
|
||||
variance = INVARIANT,
|
||||
isReified = false
|
||||
)
|
||||
javaTypeParameterStack.add(this, result)
|
||||
return result
|
||||
}
|
||||
@@ -167,7 +177,7 @@ class JavaSymbolProvider(
|
||||
}
|
||||
}
|
||||
FirJavaClass(
|
||||
session, (javaClass as? JavaElementImpl<*>)?.psi,
|
||||
(javaClass as? JavaElementImpl<*>)?.psi, session,
|
||||
firSymbol as FirClassSymbol, javaClass.name,
|
||||
javaClass.visibility, javaClass.modality,
|
||||
javaClass.classKind, isTopLevel = isTopLevel,
|
||||
@@ -187,7 +197,7 @@ class JavaSymbolProvider(
|
||||
val fieldSymbol = FirFieldSymbol(fieldId)
|
||||
val returnType = javaField.type
|
||||
val firJavaField = FirJavaField(
|
||||
this@JavaSymbolProvider.session, (javaField as? JavaElementImpl<*>)?.psi,
|
||||
(javaField as? JavaElementImpl<*>)?.psi, this@JavaSymbolProvider.session,
|
||||
fieldSymbol, fieldName,
|
||||
javaField.visibility, javaField.modality,
|
||||
returnTypeRef = returnType.toFirJavaTypeRef(this@JavaSymbolProvider.session, javaTypeParameterStack),
|
||||
@@ -231,10 +241,13 @@ class JavaSymbolProvider(
|
||||
val constructorSymbol = FirConstructorSymbol(constructorId)
|
||||
val classTypeParameters = javaClass.typeParameters.convertTypeParameters(javaTypeParameterStack)
|
||||
val firJavaConstructor = FirJavaConstructor(
|
||||
this@JavaSymbolProvider.session, psi,
|
||||
constructorSymbol, visibility, isPrimary,
|
||||
psi,
|
||||
this@JavaSymbolProvider.session,
|
||||
constructorSymbol,
|
||||
visibility,
|
||||
isPrimary,
|
||||
isInner = !javaClass.isStatic,
|
||||
delegatedSelfTypeRef = FirResolvedTypeRefImpl(
|
||||
returnTypeRef = FirResolvedTypeRefImpl(
|
||||
null,
|
||||
firSymbol.constructType(
|
||||
classTypeParameters.map { ConeTypeParameterTypeImpl(it.symbol.toLookupTag(), false) }.toTypedArray(),
|
||||
|
||||
@@ -15,11 +15,13 @@ import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirArrayOfCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.*
|
||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||
import org.jetbrains.kotlin.fir.java.declarations.FirJavaValueParameter
|
||||
import org.jetbrains.kotlin.fir.java.enhancement.readOnlyToMutable
|
||||
import org.jetbrains.kotlin.fir.java.types.FirJavaTypeRef
|
||||
import org.jetbrains.kotlin.fir.references.FirErrorNamedReference
|
||||
import org.jetbrains.kotlin.fir.references.FirResolvedCallableReferenceImpl
|
||||
import org.jetbrains.kotlin.fir.references.impl.FirErrorNamedReferenceImpl
|
||||
import org.jetbrains.kotlin.fir.references.impl.FirResolvedCallableReferenceImpl
|
||||
import org.jetbrains.kotlin.fir.resolve.constructClassType
|
||||
import org.jetbrains.kotlin.fir.resolve.firSymbolProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.getClassDeclaredCallableSymbols
|
||||
@@ -91,9 +93,10 @@ internal fun JavaClassifierType.toFirResolvedTypeRef(
|
||||
): FirResolvedTypeRef {
|
||||
val coneType = this.toConeKotlinTypeWithNullability(session, javaTypeParameterStack, isNullable = false)
|
||||
return FirResolvedTypeRefImpl(
|
||||
psi = null, type = coneType,
|
||||
annotations = annotations.map { it.toFirAnnotationCall(session, javaTypeParameterStack) }
|
||||
)
|
||||
psi = null, type = coneType
|
||||
).apply {
|
||||
annotations += this@toFirResolvedTypeRef.annotations.map { it.toFirAnnotationCall(session, javaTypeParameterStack) }
|
||||
}
|
||||
}
|
||||
|
||||
internal fun JavaType?.toConeKotlinTypeWithNullability(
|
||||
@@ -173,8 +176,7 @@ internal fun JavaAnnotation.toFirAnnotationCall(
|
||||
psi = null, useSiteTarget = null,
|
||||
annotationTypeRef = FirResolvedTypeRefImpl(
|
||||
psi = null,
|
||||
type = ConeClassTypeImpl(FirClassSymbol(classId!!).toLookupTag(), emptyArray(), isNullable = false),
|
||||
annotations = emptyList()
|
||||
type = ConeClassTypeImpl(FirClassSymbol(classId!!).toLookupTag(), emptyArray(), isNullable = false)
|
||||
)
|
||||
).apply {
|
||||
for (argument in this@toFirAnnotationCall.arguments) {
|
||||
@@ -256,7 +258,7 @@ private fun JavaAnnotationArgument.toFirExpression(
|
||||
null
|
||||
}
|
||||
this.calleeReference = calleeReference
|
||||
?: FirErrorNamedReference(null, "Strange Java enum value: $classId.$entryName")
|
||||
?: FirErrorNamedReferenceImpl(null, "Strange Java enum value: $classId.$entryName")
|
||||
}
|
||||
}
|
||||
is JavaClassObjectAnnotationArgument -> FirGetClassCallImpl(null).apply {
|
||||
@@ -309,8 +311,7 @@ private fun JavaType.toFirResolvedTypeRef(
|
||||
): FirResolvedTypeRef {
|
||||
if (this is JavaClassifierType) return toFirResolvedTypeRef(session, javaTypeParameterStack)
|
||||
return FirResolvedTypeRefImpl(
|
||||
psi = null, type = ConeClassErrorType("Unexpected JavaType: $this"),
|
||||
annotations = emptyList()
|
||||
psi = null, type = ConeClassErrorType("Unexpected JavaType: $this")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -10,42 +10,45 @@ import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirClassLikeDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirAbstractMemberDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirModifiableClass
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.java.JavaTypeParameterStack
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
import org.jetbrains.kotlin.fir.visitors.transformInplace
|
||||
import org.jetbrains.kotlin.fir.visitors.transformSingle
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
class FirJavaClass internal constructor(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
override val psi: PsiElement?,
|
||||
override val session: FirSession,
|
||||
override val symbol: FirClassSymbol,
|
||||
name: Name,
|
||||
override val name: Name,
|
||||
visibility: Visibility,
|
||||
modality: Modality?,
|
||||
override val classKind: ClassKind,
|
||||
isTopLevel: Boolean,
|
||||
isStatic: Boolean,
|
||||
internal val javaTypeParameterStack: JavaTypeParameterStack
|
||||
) : FirAbstractMemberDeclaration(
|
||||
session, psi, name,
|
||||
visibility, modality,
|
||||
isExpect = false, isActual = false
|
||||
), FirRegularClass, FirModifiableClass {
|
||||
) : FirRegularClass, FirModifiableClass {
|
||||
override var status: FirDeclarationStatusImpl = FirDeclarationStatusImpl(visibility, modality)
|
||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
||||
|
||||
init {
|
||||
symbol.bind(this)
|
||||
status.isInner = !isTopLevel && !isStatic
|
||||
status.isCompanion = false
|
||||
status.isData = false
|
||||
status.isInline = false
|
||||
resolvePhase = FirResolvePhase.DECLARATIONS
|
||||
}
|
||||
|
||||
override var resolvePhase: FirResolvePhase = FirResolvePhase.DECLARATIONS
|
||||
|
||||
override val superTypeRefs = mutableListOf<FirTypeRef>()
|
||||
|
||||
override val declarations = mutableListOf<FirDeclaration>()
|
||||
@@ -53,11 +56,31 @@ class FirJavaClass internal constructor(
|
||||
override val companionObject: FirRegularClass?
|
||||
get() = null
|
||||
|
||||
override fun replaceSupertypes(newSupertypes: List<FirTypeRef>): FirRegularClass {
|
||||
override fun replaceSuperTypeRefs(newSuperTypeRefs: List<FirTypeRef>) {
|
||||
superTypeRefs.clear()
|
||||
superTypeRefs.addAll(newSupertypes)
|
||||
return this
|
||||
superTypeRefs.addAll(newSuperTypeRefs)
|
||||
}
|
||||
|
||||
override var supertypesComputationStatus = FirClassLikeDeclaration.SupertypesComputationStatus.NOT_COMPUTED
|
||||
override var supertypesComputationStatus = SupertypesComputationStatus.NOT_COMPUTED
|
||||
|
||||
override fun replaceSupertypesComputationStatus(newSupertypesComputationStatus: SupertypesComputationStatus) {
|
||||
supertypesComputationStatus = newSupertypesComputationStatus
|
||||
}
|
||||
|
||||
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
|
||||
declarations.forEach { it.accept(visitor, data) }
|
||||
annotations.forEach { it.accept(visitor, data) }
|
||||
typeParameters.forEach { it.accept(visitor, data) }
|
||||
status.accept(visitor, data)
|
||||
superTypeRefs.forEach { it.accept(visitor, data) }
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirModifiableClass {
|
||||
declarations.transformInplace(transformer, data)
|
||||
annotations.transformInplace(transformer, data)
|
||||
typeParameters.transformInplace(transformer, data)
|
||||
status = status.transformSingle(transformer, data)
|
||||
superTypeRefs.transformInplace(transformer, data)
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
+61
-24
@@ -8,44 +8,51 @@ package org.jetbrains.kotlin.fir.java.declarations
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.CONSTRUCTOR_NAME
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirConstructor
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.FirValueParameter
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirAbstractCallableMember
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirConstructorImpl.Companion.NAME
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirBlock
|
||||
import org.jetbrains.kotlin.fir.expressions.FirDelegatedConstructorCall
|
||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||
import org.jetbrains.kotlin.fir.references.FirControlFlowGraphReference
|
||||
import org.jetbrains.kotlin.fir.references.impl.FirEmptyControlFlowGraphReference
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol
|
||||
import org.jetbrains.kotlin.fir.transformInplace
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
import org.jetbrains.kotlin.fir.visitors.transformInplace
|
||||
import org.jetbrains.kotlin.fir.visitors.transformSingle
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
|
||||
|
||||
class FirJavaConstructor(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
override val psi: PsiElement?,
|
||||
override val session: FirSession,
|
||||
override val symbol: FirConstructorSymbol,
|
||||
visibility: Visibility,
|
||||
override val isPrimary: Boolean,
|
||||
override val isInner: Boolean,
|
||||
delegatedSelfTypeRef: FirTypeRef
|
||||
) : FirAbstractCallableMember<FirConstructor>(
|
||||
session,
|
||||
psi,
|
||||
name = NAME,
|
||||
visibility = visibility,
|
||||
modality = Modality.FINAL,
|
||||
isExpect = false,
|
||||
isActual = false,
|
||||
isOverride = false,
|
||||
receiverTypeRef = null,
|
||||
returnTypeRef = delegatedSelfTypeRef
|
||||
), FirConstructor {
|
||||
isInner: Boolean,
|
||||
override var returnTypeRef : FirTypeRef
|
||||
) : FirAbstractAnnotatedElement, FirConstructor {
|
||||
override val receiverTypeRef: FirTypeRef? get() = null
|
||||
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
||||
override val name: Name get() = CONSTRUCTOR_NAME
|
||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||
|
||||
override var status: FirDeclarationStatus = FirDeclarationStatusImpl(visibility, Modality.FINAL).apply {
|
||||
isExpect = false
|
||||
isActual = false
|
||||
isOverride = false
|
||||
this.isInner = isInner
|
||||
}
|
||||
|
||||
override var resolvePhase: FirResolvePhase = FirResolvePhase.DECLARATIONS
|
||||
|
||||
init {
|
||||
symbol.bind(this)
|
||||
resolvePhase = FirResolvePhase.DECLARATIONS
|
||||
}
|
||||
|
||||
override val delegatedConstructor: FirDelegatedConstructorCall?
|
||||
@@ -56,7 +63,7 @@ class FirJavaConstructor(
|
||||
|
||||
override val valueParameters = mutableListOf<FirValueParameter>()
|
||||
|
||||
override val controlFlowGraphReference: FirControlFlowGraphReference? get() = null
|
||||
override val controlFlowGraphReference: FirControlFlowGraphReference get() = FirEmptyControlFlowGraphReference()
|
||||
|
||||
override fun <D> transformValueParameters(transformer: FirTransformer<D>, data: D): FirJavaConstructor {
|
||||
valueParameters.transformInplace(transformer, data)
|
||||
@@ -66,4 +73,34 @@ class FirJavaConstructor(
|
||||
override fun <D> transformControlFlowGraphReference(transformer: FirTransformer<D>, data: D): FirJavaConstructor {
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformReturnTypeRef(transformer: FirTransformer<D>, data: D): FirConstructor {
|
||||
returnTypeRef = returnTypeRef.transformSingle(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun replaceResolvePhase(newResolvePhase: FirResolvePhase) {
|
||||
resolvePhase = newResolvePhase
|
||||
}
|
||||
|
||||
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
|
||||
returnTypeRef.accept(visitor, data)
|
||||
controlFlowGraphReference.accept(visitor, data)
|
||||
typeParameters.forEach { it.accept(visitor, data) }
|
||||
valueParameters.forEach { it.accept(visitor, data) }
|
||||
status.accept(visitor, data)
|
||||
annotations.forEach { it.accept(visitor, data) }
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirJavaConstructor {
|
||||
transformReturnTypeRef(transformer, data)
|
||||
transformControlFlowGraphReference(transformer, data)
|
||||
typeParameters.transformInplace(transformer, data)
|
||||
transformValueParameters(transformer, data)
|
||||
status = status.transformSingle(transformer, data)
|
||||
annotations.transformInplace(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override var containerSource: DeserializedContainerSource? = null
|
||||
}
|
||||
@@ -8,36 +8,86 @@ package org.jetbrains.kotlin.fir.java.declarations
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirAnnotationContainer
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirField
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirAbstractCallableMember
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirFieldSymbol
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
import org.jetbrains.kotlin.fir.visitors.transformInplace
|
||||
import org.jetbrains.kotlin.fir.visitors.transformSingle
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
|
||||
|
||||
class FirJavaField(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
override val psi: PsiElement?,
|
||||
override val session: FirSession,
|
||||
override val symbol: FirFieldSymbol,
|
||||
name: Name,
|
||||
override val name: Name,
|
||||
visibility: Visibility,
|
||||
modality: Modality?,
|
||||
returnTypeRef: FirTypeRef,
|
||||
override var returnTypeRef: FirTypeRef,
|
||||
override val isVar: Boolean,
|
||||
isStatic: Boolean
|
||||
) : FirAbstractCallableMember<FirField>(
|
||||
session, psi, name,
|
||||
visibility, modality,
|
||||
isExpect = false, isActual = false, isOverride = false,
|
||||
receiverTypeRef = null, returnTypeRef = returnTypeRef
|
||||
), FirField {
|
||||
) : FirAbstractAnnotatedElement, FirField {
|
||||
init {
|
||||
symbol.bind(this)
|
||||
resolvePhase = FirResolvePhase.DECLARATIONS
|
||||
}
|
||||
|
||||
override var status: FirDeclarationStatus = FirDeclarationStatusImpl(visibility, modality).apply {
|
||||
this.isStatic = isStatic
|
||||
isExpect = false
|
||||
isActual = false
|
||||
isOverride = false
|
||||
}
|
||||
override val receiverTypeRef: FirTypeRef? get() = null
|
||||
override var resolvePhase: FirResolvePhase = FirResolvePhase.DECLARATIONS
|
||||
override val isVal: Boolean = true
|
||||
override val getter: FirPropertyAccessor? get() = null
|
||||
override val setter: FirPropertyAccessor? get() = null
|
||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||
override val typeParameters: MutableList<FirTypeParameter> = mutableListOf()
|
||||
|
||||
override fun <D> transformReturnTypeRef(transformer: FirTransformer<D>, data: D): FirField {
|
||||
returnTypeRef = returnTypeRef.transformSingle(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformGetter(transformer: FirTransformer<D>, data: D): FirField {
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformSetter(transformer: FirTransformer<D>, data: D): FirField {
|
||||
return this
|
||||
}
|
||||
|
||||
override fun <D> transformOtherChildren(transformer: FirTransformer<D>, data: D): FirField {
|
||||
annotations.transformInplace(transformer, data)
|
||||
typeParameters.transformInplace(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun replaceResolvePhase(newResolvePhase: FirResolvePhase) {
|
||||
resolvePhase = newResolvePhase
|
||||
}
|
||||
|
||||
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
|
||||
returnTypeRef.accept(visitor, data)
|
||||
annotations.forEach { it.accept(visitor, data) }
|
||||
typeParameters.forEach { it.accept(visitor, data) }
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirJavaField {
|
||||
transformReturnTypeRef(transformer, data)
|
||||
transformOtherChildren(transformer, data)
|
||||
return this
|
||||
}
|
||||
|
||||
override val delegate: FirExpression?
|
||||
@@ -49,11 +99,5 @@ class FirJavaField(
|
||||
override val delegateFieldSymbol: FirDelegateFieldSymbol<FirField>?
|
||||
get() = null
|
||||
|
||||
init {
|
||||
status.isStatic = isStatic
|
||||
}
|
||||
|
||||
override fun <D> transformChildrenWithoutAccessors(transformer: FirTransformer<D>, data: D) {
|
||||
transformChildren(transformer, data)
|
||||
}
|
||||
override var containerSource: DeserializedContainerSource? = null
|
||||
}
|
||||
@@ -10,7 +10,8 @@ import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirMemberFunctionImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirSimpleFunctionImpl
|
||||
import org.jetbrains.kotlin.fir.java.types.FirJavaTypeRef
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
@@ -24,17 +25,27 @@ class FirJavaMethod(
|
||||
modality: Modality?,
|
||||
returnTypeRef: FirJavaTypeRef,
|
||||
isStatic: Boolean
|
||||
) : FirMemberFunctionImpl(
|
||||
session, psi, symbol, name,
|
||||
visibility, modality,
|
||||
false, isActual = false,
|
||||
isOverride = false,
|
||||
isOperator = true, // All Java methods with name that allows to use it in operator form are considered operators
|
||||
isInfix = false, isInline = false, isTailRec = false, isExternal = false, isSuspend = false,
|
||||
receiverTypeRef = null, returnTypeRef = returnTypeRef
|
||||
) : FirSimpleFunctionImpl(
|
||||
psi,
|
||||
session,
|
||||
returnTypeRef,
|
||||
null,
|
||||
name,
|
||||
FirDeclarationStatusImpl(visibility, modality).apply {
|
||||
this.isStatic = isStatic
|
||||
isExpect = false
|
||||
isActual = false
|
||||
isOverride = false
|
||||
isOperator = true // All Java methods with name that allows to use it in operator form are considered operators
|
||||
isInfix = false
|
||||
isInline = false
|
||||
isTailRec = false
|
||||
isExternal = false
|
||||
isSuspend = false
|
||||
},
|
||||
symbol
|
||||
) {
|
||||
init {
|
||||
status.isStatic = isStatic
|
||||
resolvePhase = FirResolvePhase.DECLARATIONS
|
||||
}
|
||||
}
|
||||
+10
-2
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirValueParameterImpl
|
||||
import org.jetbrains.kotlin.fir.java.types.FirJavaTypeRef
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
class FirJavaValueParameter(
|
||||
@@ -19,8 +20,15 @@ class FirJavaValueParameter(
|
||||
returnTypeRef: FirJavaTypeRef,
|
||||
isVararg: Boolean
|
||||
) : FirValueParameterImpl(
|
||||
session, psi, name, returnTypeRef,
|
||||
defaultValue = null, isCrossinline = false, isNoinline = false, isVararg = isVararg
|
||||
psi,
|
||||
session,
|
||||
returnTypeRef,
|
||||
name,
|
||||
FirVariableSymbol(name),
|
||||
defaultValue = null,
|
||||
isCrossinline = false,
|
||||
isNoinline = false,
|
||||
isVararg = isVararg
|
||||
) {
|
||||
init {
|
||||
resolvePhase = FirResolvePhase.DECLARATIONS
|
||||
|
||||
+10
-9
@@ -10,19 +10,21 @@ import org.jetbrains.kotlin.descriptors.SourceElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirEnumEntryImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirMemberFunctionImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirMemberPropertyImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirSimpleFunctionImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirPropertyImpl
|
||||
import org.jetbrains.kotlin.fir.deserialization.FirDeserializationContext
|
||||
import org.jetbrains.kotlin.fir.deserialization.deserializeClassToSymbol
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirClassReferenceExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.*
|
||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||
import org.jetbrains.kotlin.fir.java.JavaSymbolProvider
|
||||
import org.jetbrains.kotlin.fir.java.createConstant
|
||||
import org.jetbrains.kotlin.fir.java.topLevelName
|
||||
import org.jetbrains.kotlin.fir.references.FirErrorNamedReference
|
||||
import org.jetbrains.kotlin.fir.references.FirResolvedCallableReferenceImpl
|
||||
import org.jetbrains.kotlin.fir.references.impl.FirErrorNamedReferenceImpl
|
||||
import org.jetbrains.kotlin.fir.references.impl.FirResolvedCallableReferenceImpl
|
||||
import org.jetbrains.kotlin.fir.resolve.*
|
||||
import org.jetbrains.kotlin.fir.scopes.FirScope
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.declaredMemberScope
|
||||
@@ -171,8 +173,7 @@ class KotlinDeserializedJvmSymbolsProvider(
|
||||
private fun FirClassifierSymbol<*>?.toDefaultResolvedTypeRef(classId: ClassId): FirResolvedTypeRef {
|
||||
return this?.let {
|
||||
FirResolvedTypeRefImpl(
|
||||
null, it.constructType(emptyList(), isNullable = false),
|
||||
annotations = emptyList()
|
||||
null, it.constructType(emptyList(), isNullable = false)
|
||||
)
|
||||
} ?: FirErrorTypeRefImpl(null, "Symbol not found for $classId")
|
||||
|
||||
@@ -224,7 +225,7 @@ class KotlinDeserializedJvmSymbolsProvider(
|
||||
)
|
||||
}
|
||||
else -> {
|
||||
FirErrorNamedReference(
|
||||
FirErrorNamedReferenceImpl(
|
||||
null,
|
||||
errorReason = "Strange deserialized enum value: ${this@toEnumEntryReferenceExpression}.$name"
|
||||
)
|
||||
@@ -282,7 +283,7 @@ class KotlinDeserializedJvmSymbolsProvider(
|
||||
result += FirAnnotationCallImpl(null, null, symbol.toDefaultResolvedTypeRef(annotationClassId)).apply {
|
||||
for ((name, expression) in argumentMap) {
|
||||
arguments += FirNamedArgumentExpressionImpl(
|
||||
null, name, false, expression
|
||||
null, expression, false, name
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -357,7 +358,7 @@ class KotlinDeserializedJvmSymbolsProvider(
|
||||
val functionIds = part.topLevelFunctionNameIndex[name] ?: return emptyList()
|
||||
return functionIds.map { part.proto.getFunction(it) }
|
||||
.map {
|
||||
val firNamedFunction = part.context.memberDeserializer.loadFunction(it) as FirMemberFunctionImpl
|
||||
val firNamedFunction = part.context.memberDeserializer.loadFunction(it) as FirSimpleFunctionImpl
|
||||
firNamedFunction.containerSource = part.source
|
||||
firNamedFunction.symbol
|
||||
}
|
||||
@@ -367,7 +368,7 @@ class KotlinDeserializedJvmSymbolsProvider(
|
||||
val propertyIds = part.topLevelPropertyNameIndex[name] ?: return emptyList()
|
||||
return propertyIds.map { part.proto.getProperty(it) }
|
||||
.map {
|
||||
val firProperty = part.context.memberDeserializer.loadProperty(it) as FirMemberPropertyImpl
|
||||
val firProperty = part.context.memberDeserializer.loadProperty(it) as FirPropertyImpl
|
||||
firProperty.containerSource = part.source
|
||||
firProperty.symbol
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,10 +6,10 @@
|
||||
package org.jetbrains.kotlin.fir.java.enhancement
|
||||
|
||||
import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap
|
||||
import org.jetbrains.kotlin.fir.FirAnnotationContainer
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirValueParameter
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationContainer
|
||||
import org.jetbrains.kotlin.fir.expressions.resolvedFqName
|
||||
import org.jetbrains.kotlin.fir.java.JavaTypeParameterStack
|
||||
import org.jetbrains.kotlin.fir.java.toConeKotlinTypeWithNullability
|
||||
|
||||
@@ -19,8 +19,8 @@ import org.jetbrains.kotlin.fir.java.declarations.FirJavaField
|
||||
import org.jetbrains.kotlin.fir.java.toConeProjection
|
||||
import org.jetbrains.kotlin.fir.java.toNotNullConeKotlinType
|
||||
import org.jetbrains.kotlin.fir.java.types.FirJavaTypeRef
|
||||
import org.jetbrains.kotlin.fir.references.FirResolvedCallableReferenceImpl
|
||||
import org.jetbrains.kotlin.fir.references.FirSimpleNamedReference
|
||||
import org.jetbrains.kotlin.fir.references.impl.FirResolvedCallableReferenceImpl
|
||||
import org.jetbrains.kotlin.fir.references.impl.FirSimpleNamedReference
|
||||
import org.jetbrains.kotlin.fir.resolve.constructType
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.resolve.toTypeProjection
|
||||
@@ -85,13 +85,16 @@ private fun JavaType?.enhancePossiblyFlexible(
|
||||
|
||||
FirResolvedTypeRefImpl(
|
||||
psi = null,
|
||||
type = coneFlexibleOrSimpleType(session, lowerResult, upperResult),
|
||||
annotations = annotations
|
||||
)
|
||||
type = coneFlexibleOrSimpleType(session, lowerResult, upperResult)
|
||||
).apply {
|
||||
this.annotations += annotations
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
val enhanced = type.toNotNullConeKotlinType(session, javaTypeParameterStack)
|
||||
FirResolvedTypeRefImpl(psi = null, type = enhanced, annotations = annotations)
|
||||
FirResolvedTypeRefImpl(psi = null, type = enhanced).apply {
|
||||
this.annotations += annotations
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -249,7 +252,7 @@ internal fun ConeKotlinType.lexicalCastFrom(session: FirSession, value: String):
|
||||
|
||||
return if (firEnumEntry != null) FirQualifiedAccessExpressionImpl(null).apply {
|
||||
calleeReference = FirSimpleNamedReference(
|
||||
null, name // TODO: , firEnumEntry.symbol
|
||||
null, name, null // TODO: , firEnumEntry.symbol
|
||||
)
|
||||
} else if (firElement is FirJavaClass) {
|
||||
val firStaticProperty = firElement.declarations.filterIsInstance<FirJavaField>().find {
|
||||
|
||||
+35
-22
@@ -5,12 +5,15 @@
|
||||
|
||||
package org.jetbrains.kotlin.fir.java.scopes
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||
import org.jetbrains.kotlin.fir.FirAnnotationContainer
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.*
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationContainer
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirConstExpressionImpl
|
||||
import org.jetbrains.kotlin.fir.impl.FirAbstractAnnotatedElement
|
||||
import org.jetbrains.kotlin.fir.java.JavaTypeParameterStack
|
||||
import org.jetbrains.kotlin.fir.java.declarations.*
|
||||
import org.jetbrains.kotlin.fir.java.enhancement.*
|
||||
@@ -84,8 +87,8 @@ class JavaClassEnhancementScope(
|
||||
val symbol = FirFieldSymbol(original.callableId)
|
||||
with(firElement) {
|
||||
FirJavaField(
|
||||
this@JavaClassEnhancementScope.session,
|
||||
firElement.psi,
|
||||
this@JavaClassEnhancementScope.session,
|
||||
symbol,
|
||||
name,
|
||||
visibility,
|
||||
@@ -172,8 +175,9 @@ class JavaClassEnhancementScope(
|
||||
val (newTypeRef, newDefaultValue) = newInfo
|
||||
with(valueParameter) {
|
||||
FirValueParameterImpl(
|
||||
this@JavaClassEnhancementScope.session, psi,
|
||||
this.name, newTypeRef,
|
||||
psi, this@JavaClassEnhancementScope.session,
|
||||
newTypeRef, this.name,
|
||||
FirVariableSymbol(this.name),
|
||||
defaultValue ?: newDefaultValue, isCrossinline, isNoinline, isVararg
|
||||
).apply {
|
||||
resolvePhase = FirResolvePhase.DECLARATIONS
|
||||
@@ -181,23 +185,31 @@ class JavaClassEnhancementScope(
|
||||
}
|
||||
}
|
||||
}
|
||||
val function: FirMemberFunction<*> = when (firMethod) {
|
||||
val function = when (firMethod) {
|
||||
is FirJavaConstructor -> {
|
||||
val symbol = FirConstructorSymbol(methodId)
|
||||
val status = FirDeclarationStatusImpl(firMethod.visibility, Modality.FINAL).apply {
|
||||
isExpect = false
|
||||
isActual = false
|
||||
isInner = firMethod.isInner
|
||||
}
|
||||
if (firMethod.isPrimary) {
|
||||
FirPrimaryConstructorImpl(
|
||||
this@JavaClassEnhancementScope.session, firMethod.psi, symbol,
|
||||
firMethod.visibility,
|
||||
isExpect = false,
|
||||
isActual = false,
|
||||
isInner = firMethod.isInner,
|
||||
delegatedSelfTypeRef = newReturnTypeRef,
|
||||
delegatedConstructor = null
|
||||
firMethod.psi,
|
||||
this@JavaClassEnhancementScope.session,
|
||||
newReturnTypeRef,
|
||||
null,
|
||||
status,
|
||||
symbol
|
||||
)
|
||||
} else {
|
||||
FirConstructorImpl(
|
||||
this@JavaClassEnhancementScope.session, firMethod.psi, symbol,
|
||||
newReceiverTypeRef, newReturnTypeRef
|
||||
firMethod.psi,
|
||||
this@JavaClassEnhancementScope.session,
|
||||
newReturnTypeRef,
|
||||
newReceiverTypeRef,
|
||||
firMethod.status,
|
||||
symbol
|
||||
)
|
||||
}.apply {
|
||||
resolvePhase = FirResolvePhase.DECLARATIONS
|
||||
@@ -205,21 +217,22 @@ class JavaClassEnhancementScope(
|
||||
this.typeParameters += firMethod.typeParameters
|
||||
}
|
||||
}
|
||||
else -> FirMemberFunctionImpl(
|
||||
this@JavaClassEnhancementScope.session, firMethod.psi,
|
||||
else -> FirSimpleFunctionImpl(
|
||||
firMethod.psi,
|
||||
this@JavaClassEnhancementScope.session,
|
||||
newReturnTypeRef,
|
||||
newReceiverTypeRef,
|
||||
name,
|
||||
firMethod.status,
|
||||
if (!isAccessor) FirNamedFunctionSymbol(methodId)
|
||||
else FirAccessorSymbol(callableId = propertyId!!, accessorId = methodId),
|
||||
name, newReceiverTypeRef, newReturnTypeRef
|
||||
else FirAccessorSymbol(callableId = propertyId!!, accessorId = methodId)
|
||||
).apply {
|
||||
resolvePhase = FirResolvePhase.DECLARATIONS
|
||||
this.valueParameters += newValueParameters
|
||||
this.typeParameters += firMethod.typeParameters
|
||||
}
|
||||
}
|
||||
(function as FirAbstractCallableMember<*>).apply {
|
||||
status = firMethod.status as FirDeclarationStatusImpl
|
||||
annotations += firMethod.annotations
|
||||
}
|
||||
function.annotations += firMethod.annotations
|
||||
return function.symbol
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class JavaClassUseSiteScope(
|
||||
substitutor
|
||||
)
|
||||
|
||||
private fun isOverriddenFunCheck(overriddenInJava: FirNamedFunction, base: FirNamedFunction): Boolean {
|
||||
private fun isOverriddenFunCheck(overriddenInJava: FirSimpleFunction, base: FirSimpleFunction): Boolean {
|
||||
val receiverTypeRef = base.receiverTypeRef
|
||||
val baseParameterTypes = listOfNotNull(receiverTypeRef) + base.valueParameters.map { it.returnTypeRef }
|
||||
|
||||
@@ -83,7 +83,7 @@ class JavaClassUseSiteScope(
|
||||
}
|
||||
}
|
||||
|
||||
private fun isOverriddenPropertyCheck(overriddenInJava: FirNamedFunction, base: FirProperty): Boolean {
|
||||
private fun isOverriddenPropertyCheck(overriddenInJava: FirSimpleFunction, base: FirProperty): Boolean {
|
||||
val receiverTypeRef = base.receiverTypeRef
|
||||
if (receiverTypeRef == null) {
|
||||
// TODO: setters
|
||||
|
||||
Reference in New Issue
Block a user