Revert "AA FIR: have KtFirReceiverParameterSymbol implement KtFirSymbol"
The commit is reverted due to failing tests:
- FirGotoTypeDeclarationTestGenerated
- FirGotoDeclarationTestGenerated
This reverts commit eb23984182.
This commit is contained in:
+9
-9
@@ -27,9 +27,10 @@ import org.jetbrains.kotlin.utils.exceptions.errorWithAttachment
|
|||||||
import org.jetbrains.kotlin.utils.exceptions.requireWithAttachment
|
import org.jetbrains.kotlin.utils.exceptions.requireWithAttachment
|
||||||
|
|
||||||
internal class KtFirReceiverParameterSymbol(
|
internal class KtFirReceiverParameterSymbol(
|
||||||
override val firSymbol: FirCallableSymbol<*>,
|
val firSymbol: FirCallableSymbol<*>,
|
||||||
override val analysisSession: KtFirAnalysisSession,
|
val analysisSession: KtFirAnalysisSession,
|
||||||
) : KtReceiverParameterSymbol(), KtFirSymbol<FirCallableSymbol<*>> {
|
) : KtReceiverParameterSymbol(), KtLifetimeOwner {
|
||||||
|
override val token: KtLifetimeToken get() = analysisSession.token
|
||||||
override val psi: PsiElement? = withValidityAssertion{ firSymbol.fir.receiverParameter?.typeRef?.psi }
|
override val psi: PsiElement? = withValidityAssertion{ firSymbol.fir.receiverParameter?.typeRef?.psi }
|
||||||
|
|
||||||
init {
|
init {
|
||||||
@@ -39,13 +40,15 @@ internal class KtFirReceiverParameterSymbol(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override val type: KtType by cached {
|
override val type: KtType by cached {
|
||||||
firSymbol.receiverType(builder)
|
firSymbol.receiverType(analysisSession.firSymbolBuilder)
|
||||||
?: errorWithAttachment("${firSymbol::class} doesn't have an extension receiver") {
|
?: errorWithAttachment("${firSymbol::class} doesn't have an extension receiver") {
|
||||||
withFirEntry("callable", firSymbol.fir)
|
withFirEntry("callable", firSymbol.fir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override val owningCallableSymbol: KtCallableSymbol by cached { builder.callableBuilder.buildCallableSymbol(firSymbol) }
|
override val owningCallableSymbol: KtCallableSymbol by cached { analysisSession.firSymbolBuilder.callableBuilder.buildCallableSymbol(firSymbol) }
|
||||||
|
|
||||||
|
override val origin: KtSymbolOrigin = withValidityAssertion { firSymbol.fir.ktSymbolOrigin() }
|
||||||
|
|
||||||
context(KtAnalysisSession)
|
context(KtAnalysisSession)
|
||||||
override fun createPointer(): KtSymbolPointer<KtReceiverParameterSymbol> = withValidityAssertion {
|
override fun createPointer(): KtSymbolPointer<KtReceiverParameterSymbol> = withValidityAssertion {
|
||||||
@@ -53,9 +56,6 @@ internal class KtFirReceiverParameterSymbol(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override val annotationsList: KtAnnotationsList by cached {
|
override val annotationsList: KtAnnotationsList by cached {
|
||||||
KtFirAnnotationListForReceiverParameter.create(firSymbol, builder)
|
KtFirAnnotationListForReceiverParameter.create(firSymbol, builder = analysisSession.firSymbolBuilder)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean = symbolEquals(other)
|
|
||||||
override fun hashCode(): Int = symbolHashCode()
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user