[FIR IDE] Make annotations and extension receiver lazy

This commit is contained in:
Igor Yakovlev
2020-12-16 16:21:00 +03:00
parent 9c2d06cf70
commit 9670f67912
20 changed files with 141 additions and 113 deletions
@@ -62,7 +62,7 @@ object DebugSymbolRenderer {
is KtNamedConstantValue -> "${renderValue(value.name)} = ${renderValue(value.expression)}"
is KtAnnotationCall ->
"${renderValue(value.classId)}${value.arguments.joinToString(prefix = "(", postfix = ")") { renderValue(it) }}"
is ReceiverTypeAndAnnotations -> "${renderValue(value.annotations)} ${renderValue(value.type)}"
is KtTypeAndAnnotations -> "${renderValue(value.annotations)} ${renderValue(value.type)}"
else -> value::class.simpleName!!
}
@@ -6,11 +6,12 @@
package org.jetbrains.kotlin.idea.frontend.api.symbols.markers
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
import org.jetbrains.kotlin.idea.frontend.api.ValidityTokenOwner
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtSymbol
import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.psi.KtCallElement
abstract class KtAnnotationCall {
abstract class KtAnnotationCall : ValidityTokenOwner {
abstract val classId: ClassId?
abstract val useSiteTarget: AnnotationUseSiteTarget?
abstract val psi: KtCallElement?
@@ -5,13 +5,17 @@
package org.jetbrains.kotlin.idea.frontend.api.symbols.markers
import org.jetbrains.kotlin.idea.frontend.api.ValidityTokenOwner
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtCallableSymbol
import org.jetbrains.kotlin.idea.frontend.api.types.KtType
data class ReceiverTypeAndAnnotations(val type: KtType, val annotations: List<KtAnnotationCall>)
abstract class KtTypeAndAnnotations : ValidityTokenOwner {
abstract val type: KtType
abstract val annotations: List<KtAnnotationCall>
}
interface KtPossibleExtensionSymbol {
val receiverTypeAndAnnotations: ReceiverTypeAndAnnotations?
val receiverType: KtTypeAndAnnotations?
val isExtension: Boolean
}