Split property use-site targets during FIR building
This commit is contained in:
committed by
teamcityserver
parent
2a9a1dbb86
commit
7243d30869
@@ -36,13 +36,8 @@ KtFirKotlinPropertySymbol:
|
||||
|
||||
KtFirKotlinPropertySymbol:
|
||||
annotatedType: [] kotlin/Int
|
||||
annotationClassIds: [
|
||||
kotlin/Deprecated
|
||||
]
|
||||
annotations: [
|
||||
kotlin/Deprecated(message = don't use getter of i2)
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
annotationClassIds: []
|
||||
annotations: []
|
||||
callableIdIfNonLocal: /i2
|
||||
dispatchType: null
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
@@ -72,13 +67,8 @@ KtFirKotlinPropertySymbol:
|
||||
|
||||
KtFirKotlinPropertySymbol:
|
||||
annotatedType: [] kotlin/Int
|
||||
annotationClassIds: [
|
||||
kotlin/Deprecated
|
||||
]
|
||||
annotations: [
|
||||
kotlin/Deprecated(message = don't use getter of i3)
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
annotationClassIds: []
|
||||
annotations: []
|
||||
callableIdIfNonLocal: /i3
|
||||
dispatchType: null
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
@@ -108,16 +98,8 @@ KtFirKotlinPropertySymbol:
|
||||
|
||||
KtFirKotlinPropertySymbol:
|
||||
annotatedType: [] kotlin/Int
|
||||
annotationClassIds: [
|
||||
kotlin/Deprecated
|
||||
kotlin/Deprecated
|
||||
]
|
||||
annotations: [
|
||||
kotlin/Deprecated(message = don't use getter of i4)
|
||||
psi: KtAnnotationEntry
|
||||
kotlin/Deprecated(message = don't use getter of i4)
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
annotationClassIds: []
|
||||
annotations: []
|
||||
callableIdIfNonLocal: /i4
|
||||
dispatchType: null
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
KtFirKotlinPropertySymbol:
|
||||
annotatedType: [] kotlin/Int
|
||||
annotationClassIds: [
|
||||
kotlin/jvm/JvmName
|
||||
kotlin/jvm/JvmName
|
||||
]
|
||||
annotations: [
|
||||
kotlin/jvm/JvmName(name = getMyI)
|
||||
psi: KtAnnotationEntry
|
||||
kotlin/jvm/JvmName(name = setMyI)
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
annotationClassIds: []
|
||||
annotations: []
|
||||
callableIdIfNonLocal: /Foo.i
|
||||
dispatchType: Foo
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
|
||||
+3
-1
@@ -93,7 +93,9 @@ internal open class FirElementsRecorder : FirVisitor<Unit, MutableMap<KtElement,
|
||||
private fun cacheElement(element: FirElement, cache: MutableMap<KtElement, FirElement>) {
|
||||
val psi = element.source
|
||||
?.takeIf {
|
||||
it.kind == FirFakeSourceElementKind.ReferenceInAtomicQualifiedAccess || it is FirRealPsiSourceElement
|
||||
it is FirRealPsiSourceElement ||
|
||||
it.kind == FirFakeSourceElementKind.ReferenceInAtomicQualifiedAccess ||
|
||||
it.kind == FirFakeSourceElementKind.FromUseSiteTarget
|
||||
}.psi as? KtElement
|
||||
?: return
|
||||
cache(psi, element, cache)
|
||||
|
||||
+5
-2
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
||||
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.api.FirDeclarationDesignation
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotation
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.hasExpectModifier
|
||||
|
||||
@@ -98,14 +99,16 @@ internal class RawFirNonLocalDeclarationBuilder private constructor(
|
||||
override fun convertValueParameter(
|
||||
valueParameter: KtParameter,
|
||||
defaultTypeRef: FirTypeRef?,
|
||||
valueParameterDeclaration: ValueParameterDeclaration
|
||||
valueParameterDeclaration: ValueParameterDeclaration,
|
||||
additionalAnnotations: List<FirAnnotation>
|
||||
): FirValueParameter {
|
||||
val replacementParameter = replacementApplier?.tryReplace(valueParameter) ?: valueParameter
|
||||
check(replacementParameter is KtParameter)
|
||||
return super.convertValueParameter(
|
||||
valueParameter = replacementParameter,
|
||||
defaultTypeRef = defaultTypeRef,
|
||||
valueParameterDeclaration = valueParameterDeclaration
|
||||
valueParameterDeclaration = valueParameterDeclaration,
|
||||
additionalAnnotations = additionalAnnotations
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user