Extract AbstractFir2IrLazyFunction (base for accessor & simple function)
This commit is contained in:
committed by
Alexander Udalov
parent
c03fa59a63
commit
d27a0c91f6
@@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.fir.lazy
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.descriptors.DescriptorVisibility
|
||||||
|
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||||
|
import org.jetbrains.kotlin.descriptors.Modality
|
||||||
|
import org.jetbrains.kotlin.fir.backend.Fir2IrComponents
|
||||||
|
import org.jetbrains.kotlin.fir.backend.declareThisReceiverParameter
|
||||||
|
import org.jetbrains.kotlin.fir.declarations.*
|
||||||
|
import org.jetbrains.kotlin.fir.symbols.Fir2IrSimpleFunctionSymbol
|
||||||
|
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
||||||
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
|
import org.jetbrains.kotlin.ir.declarations.lazy.lazyVar
|
||||||
|
import org.jetbrains.kotlin.ir.expressions.IrBody
|
||||||
|
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
||||||
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
|
import org.jetbrains.kotlin.ir.util.isObject
|
||||||
|
import org.jetbrains.kotlin.name.ClassId
|
||||||
|
import org.jetbrains.kotlin.resolve.annotations.JVM_STATIC_ANNOTATION_FQ_NAME
|
||||||
|
|
||||||
|
abstract class AbstractFir2IrLazyFunction<F : FirMemberDeclaration>(
|
||||||
|
components: Fir2IrComponents,
|
||||||
|
override val startOffset: Int,
|
||||||
|
override val endOffset: Int,
|
||||||
|
override var origin: IrDeclarationOrigin,
|
||||||
|
override val symbol: Fir2IrSimpleFunctionSymbol,
|
||||||
|
override val isFakeOverride: Boolean
|
||||||
|
) : IrSimpleFunction(), AbstractFir2IrLazyDeclaration<F, IrSimpleFunction>, Fir2IrComponents by components {
|
||||||
|
|
||||||
|
override lateinit var typeParameters: List<IrTypeParameter>
|
||||||
|
override lateinit var parent: IrDeclarationParent
|
||||||
|
|
||||||
|
override val isTailrec: Boolean
|
||||||
|
get() = fir.isTailRec
|
||||||
|
|
||||||
|
override val isSuspend: Boolean
|
||||||
|
get() = fir.isSuspend
|
||||||
|
|
||||||
|
override val isOperator: Boolean
|
||||||
|
get() = fir.isOperator
|
||||||
|
|
||||||
|
override val isInfix: Boolean
|
||||||
|
get() = fir.isInfix
|
||||||
|
|
||||||
|
@ObsoleteDescriptorBasedAPI
|
||||||
|
override val descriptor: FunctionDescriptor
|
||||||
|
get() = symbol.descriptor
|
||||||
|
|
||||||
|
override val isInline: Boolean
|
||||||
|
get() = fir.isInline
|
||||||
|
|
||||||
|
override val isExternal: Boolean
|
||||||
|
get() = fir.isExternal
|
||||||
|
|
||||||
|
override val isExpect: Boolean
|
||||||
|
get() = fir.isExpect
|
||||||
|
|
||||||
|
override var body: IrBody? = null
|
||||||
|
|
||||||
|
override var visibility: DescriptorVisibility by lazyVar {
|
||||||
|
components.visibilityConverter.convertToDescriptorVisibility(fir.visibility)
|
||||||
|
}
|
||||||
|
|
||||||
|
override val modality: Modality
|
||||||
|
get() = fir.modality!!
|
||||||
|
|
||||||
|
override var correspondingPropertySymbol: IrPropertySymbol? = null
|
||||||
|
|
||||||
|
override var attributeOwnerId: IrAttributeContainer = this
|
||||||
|
|
||||||
|
override var metadata: MetadataSource?
|
||||||
|
get() = null
|
||||||
|
set(_) = error("We should never need to store metadata of external declarations.")
|
||||||
|
|
||||||
|
protected fun shouldHaveDispatchReceiver(
|
||||||
|
containingClass: IrClass,
|
||||||
|
staticOwner: FirCallableMemberDeclaration<*>
|
||||||
|
): Boolean {
|
||||||
|
return !staticOwner.isStatic &&
|
||||||
|
(!containingClass.isObject || containingClass.isCompanion || !staticOwner.hasAnnotation(JVM_STATIC_CLASS_ID))
|
||||||
|
}
|
||||||
|
|
||||||
|
protected fun createThisReceiverParameter(thisType: IrType): IrValueParameter {
|
||||||
|
declarationStorage.enterScope(this)
|
||||||
|
return declareThisReceiverParameter(symbolTable, thisType, origin).apply {
|
||||||
|
declarationStorage.leaveScope(this@AbstractFir2IrLazyFunction)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private val JVM_STATIC_CLASS_ID = ClassId.topLevel(JVM_STATIC_ANNOTATION_FQ_NAME)
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
-78
@@ -5,26 +5,15 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.fir.lazy
|
package org.jetbrains.kotlin.fir.lazy
|
||||||
|
|
||||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibility
|
|
||||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
|
||||||
import org.jetbrains.kotlin.descriptors.Modality
|
|
||||||
import org.jetbrains.kotlin.fir.backend.*
|
import org.jetbrains.kotlin.fir.backend.*
|
||||||
import org.jetbrains.kotlin.fir.backend.declareThisReceiverParameter
|
|
||||||
import org.jetbrains.kotlin.fir.backend.generateOverriddenAccessorSymbols
|
|
||||||
import org.jetbrains.kotlin.fir.declarations.*
|
import org.jetbrains.kotlin.fir.declarations.*
|
||||||
import org.jetbrains.kotlin.fir.symbols.Fir2IrSimpleFunctionSymbol
|
import org.jetbrains.kotlin.fir.symbols.Fir2IrSimpleFunctionSymbol
|
||||||
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
import org.jetbrains.kotlin.ir.declarations.lazy.lazyVar
|
import org.jetbrains.kotlin.ir.declarations.lazy.lazyVar
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrBody
|
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
import org.jetbrains.kotlin.ir.util.isNonCompanionObject
|
|
||||||
import org.jetbrains.kotlin.name.ClassId
|
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
import org.jetbrains.kotlin.resolve.annotations.JVM_STATIC_ANNOTATION_FQ_NAME
|
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
|
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
|
||||||
|
|
||||||
class Fir2IrLazyPropertyAccessor(
|
class Fir2IrLazyPropertyAccessor(
|
||||||
@@ -38,7 +27,7 @@ class Fir2IrLazyPropertyAccessor(
|
|||||||
firParentClass: FirRegularClass,
|
firParentClass: FirRegularClass,
|
||||||
override val symbol: Fir2IrSimpleFunctionSymbol,
|
override val symbol: Fir2IrSimpleFunctionSymbol,
|
||||||
override val isFakeOverride: Boolean
|
override val isFakeOverride: Boolean
|
||||||
) : IrSimpleFunction(), AbstractFir2IrLazyDeclaration<FirMemberDeclaration, IrSimpleFunction>, Fir2IrComponents by components {
|
) : AbstractFir2IrLazyFunction<FirMemberDeclaration>(components, startOffset, endOffset, origin, symbol, isFakeOverride) {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
@@ -47,81 +36,25 @@ class Fir2IrLazyPropertyAccessor(
|
|||||||
get() = firAccessor ?: firParentProperty
|
get() = firAccessor ?: firParentProperty
|
||||||
|
|
||||||
override var annotations: List<IrConstructorCall> by createLazyAnnotations()
|
override var annotations: List<IrConstructorCall> by createLazyAnnotations()
|
||||||
override lateinit var typeParameters: List<IrTypeParameter>
|
|
||||||
override lateinit var parent: IrDeclarationParent
|
|
||||||
override var correspondingPropertySymbol: IrPropertySymbol? = null
|
|
||||||
|
|
||||||
override val isTailrec: Boolean
|
|
||||||
get() = fir.isTailRec
|
|
||||||
|
|
||||||
override val isSuspend: Boolean
|
|
||||||
get() = fir.isSuspend
|
|
||||||
|
|
||||||
override val isOperator: Boolean
|
|
||||||
get() = fir.isOperator
|
|
||||||
|
|
||||||
override val isInfix: Boolean
|
|
||||||
get() = fir.isInfix
|
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
|
||||||
override val descriptor: FunctionDescriptor
|
|
||||||
get() = symbol.descriptor
|
|
||||||
|
|
||||||
override val isInline: Boolean
|
|
||||||
get() = fir.isInline
|
|
||||||
|
|
||||||
override val isExternal: Boolean
|
|
||||||
get() = fir.isExternal
|
|
||||||
|
|
||||||
override val isExpect: Boolean
|
|
||||||
get() = fir.isExpect
|
|
||||||
|
|
||||||
override var body: IrBody? = null
|
|
||||||
|
|
||||||
override val name: Name
|
override val name: Name
|
||||||
get() = Name.special("<${if (isSetter) "set" else "get"}-${firParentProperty.name}>")
|
get() = Name.special("<${if (isSetter) "set" else "get"}-${firParentProperty.name}>")
|
||||||
|
|
||||||
@Suppress("SetterBackingFieldAssignment")
|
|
||||||
override var visibility: DescriptorVisibility = components.visibilityConverter.convertToDescriptorVisibility(fir.visibility)
|
|
||||||
set(_) {
|
|
||||||
error("Mutating Fir2Ir lazy elements is not possible")
|
|
||||||
}
|
|
||||||
|
|
||||||
override val modality: Modality
|
|
||||||
get() = fir.modality!!
|
|
||||||
|
|
||||||
override var attributeOwnerId: IrAttributeContainer = this
|
|
||||||
|
|
||||||
override var returnType: IrType by lazyVar {
|
override var returnType: IrType by lazyVar {
|
||||||
if (isSetter) irBuiltIns.unitType else firParentProperty.returnTypeRef.toIrType(typeConverter)
|
if (isSetter) irBuiltIns.unitType else firParentProperty.returnTypeRef.toIrType(typeConverter, conversionTypeContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
override var dispatchReceiverParameter: IrValueParameter? by lazyVar {
|
override var dispatchReceiverParameter: IrValueParameter? by lazyVar {
|
||||||
val containingClass = parent as? IrClass
|
val containingClass = parent as? IrClass
|
||||||
if (containingClass != null && !firParentProperty.isStatic &&
|
if (containingClass != null && shouldHaveDispatchReceiver(containingClass, firParentProperty)
|
||||||
!(containingClass.isNonCompanionObject && firParentProperty.hasAnnotation(ClassId.topLevel(JVM_STATIC_ANNOTATION_FQ_NAME)))
|
|
||||||
) {
|
) {
|
||||||
declarationStorage.enterScope(this)
|
createThisReceiverParameter(thisType = containingClass.thisReceiver?.type ?: error("No this receiver for containing class"))
|
||||||
declareThisReceiverParameter(
|
|
||||||
symbolTable,
|
|
||||||
thisType = containingClass.thisReceiver?.type ?: error("No this receiver for containing class"),
|
|
||||||
thisOrigin = origin
|
|
||||||
).apply {
|
|
||||||
declarationStorage.leaveScope(this@Fir2IrLazyPropertyAccessor)
|
|
||||||
}
|
|
||||||
} else null
|
} else null
|
||||||
}
|
}
|
||||||
|
|
||||||
override var extensionReceiverParameter: IrValueParameter? by lazyVar {
|
override var extensionReceiverParameter: IrValueParameter? by lazyVar {
|
||||||
firParentProperty.receiverTypeRef?.let {
|
firParentProperty.receiverTypeRef?.let {
|
||||||
declarationStorage.enterScope(this)
|
createThisReceiverParameter(it.toIrType(typeConverter, conversionTypeContext))
|
||||||
declareThisReceiverParameter(
|
|
||||||
symbolTable,
|
|
||||||
thisType = it.toIrType(typeConverter),
|
|
||||||
thisOrigin = origin,
|
|
||||||
).apply {
|
|
||||||
declarationStorage.leaveScope(this@Fir2IrLazyPropertyAccessor)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,9 +66,9 @@ class Fir2IrLazyPropertyAccessor(
|
|||||||
declarationStorage.createDefaultSetterParameter(
|
declarationStorage.createDefaultSetterParameter(
|
||||||
startOffset, endOffset, origin,
|
startOffset, endOffset, origin,
|
||||||
(firAccessor?.valueParameters?.firstOrNull()?.returnTypeRef ?: firParentProperty.returnTypeRef).toIrType(
|
(firAccessor?.valueParameters?.firstOrNull()?.returnTypeRef ?: firParentProperty.returnTypeRef).toIrType(
|
||||||
typeConverter, ConversionTypeContext.DEFAULT.inSetter()
|
typeConverter, conversionTypeContext
|
||||||
),
|
),
|
||||||
this@Fir2IrLazyPropertyAccessor
|
parent = this@Fir2IrLazyPropertyAccessor
|
||||||
)
|
)
|
||||||
).apply {
|
).apply {
|
||||||
declarationStorage.leaveScope(this@Fir2IrLazyPropertyAccessor)
|
declarationStorage.leaveScope(this@Fir2IrLazyPropertyAccessor)
|
||||||
@@ -147,11 +80,8 @@ class Fir2IrLazyPropertyAccessor(
|
|||||||
firParentProperty.generateOverriddenAccessorSymbols(firParentClass, !isSetter, session, scopeSession, declarationStorage)
|
firParentProperty.generateOverriddenAccessorSymbols(firParentClass, !isSetter, session, scopeSession, declarationStorage)
|
||||||
}
|
}
|
||||||
|
|
||||||
override var metadata: MetadataSource?
|
|
||||||
get() = null
|
|
||||||
set(_) = error("We should never need to store metadata of external declarations.")
|
|
||||||
|
|
||||||
override val containerSource: DeserializedContainerSource?
|
override val containerSource: DeserializedContainerSource?
|
||||||
get() = firParentProperty.containerSource
|
get() = firParentProperty.containerSource
|
||||||
|
|
||||||
|
private val conversionTypeContext = if (isSetter) ConversionTypeContext.DEFAULT.inSetter() else ConversionTypeContext.DEFAULT
|
||||||
}
|
}
|
||||||
@@ -5,25 +5,16 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.fir.lazy
|
package org.jetbrains.kotlin.fir.lazy
|
||||||
|
|
||||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
|
||||||
import org.jetbrains.kotlin.descriptors.Modality
|
|
||||||
import org.jetbrains.kotlin.fir.backend.*
|
import org.jetbrains.kotlin.fir.backend.*
|
||||||
import org.jetbrains.kotlin.fir.declarations.*
|
import org.jetbrains.kotlin.fir.declarations.*
|
||||||
import org.jetbrains.kotlin.fir.symbols.Fir2IrSimpleFunctionSymbol
|
import org.jetbrains.kotlin.fir.symbols.Fir2IrSimpleFunctionSymbol
|
||||||
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
import org.jetbrains.kotlin.ir.declarations.lazy.lazyVar
|
import org.jetbrains.kotlin.ir.declarations.lazy.lazyVar
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrBody
|
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
|
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
|
||||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibility
|
|
||||||
import org.jetbrains.kotlin.ir.util.hasAnnotation
|
|
||||||
import org.jetbrains.kotlin.ir.util.isNonCompanionObject
|
|
||||||
import org.jetbrains.kotlin.resolve.annotations.JVM_STATIC_ANNOTATION_FQ_NAME
|
|
||||||
|
|
||||||
class Fir2IrLazySimpleFunction(
|
class Fir2IrLazySimpleFunction(
|
||||||
components: Fir2IrComponents,
|
components: Fir2IrComponents,
|
||||||
@@ -34,89 +25,31 @@ class Fir2IrLazySimpleFunction(
|
|||||||
firParent: FirRegularClass,
|
firParent: FirRegularClass,
|
||||||
override val symbol: Fir2IrSimpleFunctionSymbol,
|
override val symbol: Fir2IrSimpleFunctionSymbol,
|
||||||
override val isFakeOverride: Boolean
|
override val isFakeOverride: Boolean
|
||||||
) : IrSimpleFunction(), AbstractFir2IrLazyDeclaration<FirSimpleFunction, IrSimpleFunction>, Fir2IrComponents by components {
|
) : AbstractFir2IrLazyFunction<FirSimpleFunction>(components, startOffset, endOffset, origin, symbol, isFakeOverride) {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
classifierStorage.preCacheTypeParameters(fir)
|
classifierStorage.preCacheTypeParameters(fir)
|
||||||
}
|
}
|
||||||
|
|
||||||
override var annotations: List<IrConstructorCall> by createLazyAnnotations()
|
override var annotations: List<IrConstructorCall> by createLazyAnnotations()
|
||||||
override lateinit var typeParameters: List<IrTypeParameter>
|
|
||||||
override lateinit var parent: IrDeclarationParent
|
|
||||||
|
|
||||||
override val isTailrec: Boolean
|
|
||||||
get() = fir.isTailRec
|
|
||||||
|
|
||||||
override val isSuspend: Boolean
|
|
||||||
get() = fir.isSuspend
|
|
||||||
|
|
||||||
override val isOperator: Boolean
|
|
||||||
get() = fir.isOperator
|
|
||||||
|
|
||||||
override val isInfix: Boolean
|
|
||||||
get() = fir.isInfix
|
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
|
||||||
override val descriptor: FunctionDescriptor
|
|
||||||
get() = symbol.descriptor
|
|
||||||
|
|
||||||
override val isInline: Boolean
|
|
||||||
get() = fir.isInline
|
|
||||||
|
|
||||||
override val isExternal: Boolean
|
|
||||||
get() = fir.isExternal
|
|
||||||
|
|
||||||
override val isExpect: Boolean
|
|
||||||
get() = fir.isExpect
|
|
||||||
|
|
||||||
override var body: IrBody? = null
|
|
||||||
|
|
||||||
override val name: Name
|
override val name: Name
|
||||||
get() = fir.name
|
get() = fir.name
|
||||||
|
|
||||||
@Suppress("SetterBackingFieldAssignment")
|
|
||||||
override var visibility: DescriptorVisibility = components.visibilityConverter.convertToDescriptorVisibility(fir.visibility)
|
|
||||||
set(_) {
|
|
||||||
error("Mutating Fir2Ir lazy elements is not possible")
|
|
||||||
}
|
|
||||||
|
|
||||||
override val modality: Modality
|
|
||||||
get() = fir.modality!!
|
|
||||||
|
|
||||||
override var correspondingPropertySymbol: IrPropertySymbol? = null
|
|
||||||
|
|
||||||
override var attributeOwnerId: IrAttributeContainer = this
|
|
||||||
|
|
||||||
override var returnType: IrType by lazyVar {
|
override var returnType: IrType by lazyVar {
|
||||||
fir.returnTypeRef.toIrType(typeConverter)
|
fir.returnTypeRef.toIrType(typeConverter)
|
||||||
}
|
}
|
||||||
|
|
||||||
override var dispatchReceiverParameter: IrValueParameter? by lazyVar {
|
override var dispatchReceiverParameter: IrValueParameter? by lazyVar {
|
||||||
val containingClass = parent as? IrClass
|
val containingClass = parent as? IrClass
|
||||||
if (containingClass != null && !fir.isStatic &&
|
if (containingClass != null && shouldHaveDispatchReceiver(containingClass, fir)) {
|
||||||
!(containingClass.isNonCompanionObject && hasAnnotation(JVM_STATIC_ANNOTATION_FQ_NAME))
|
createThisReceiverParameter(thisType = containingClass.thisReceiver?.type ?: error("No this receiver for containing class"))
|
||||||
) {
|
|
||||||
declarationStorage.enterScope(this)
|
|
||||||
declareThisReceiverParameter(
|
|
||||||
symbolTable,
|
|
||||||
thisType = containingClass.thisReceiver?.type ?: error("No this receiver for containing class"),
|
|
||||||
thisOrigin = origin
|
|
||||||
).apply {
|
|
||||||
declarationStorage.leaveScope(this@Fir2IrLazySimpleFunction)
|
|
||||||
}
|
|
||||||
} else null
|
} else null
|
||||||
}
|
}
|
||||||
|
|
||||||
override var extensionReceiverParameter: IrValueParameter? by lazyVar {
|
override var extensionReceiverParameter: IrValueParameter? by lazyVar {
|
||||||
fir.receiverTypeRef?.let {
|
fir.receiverTypeRef?.let {
|
||||||
declarationStorage.enterScope(this)
|
createThisReceiverParameter(it.toIrType(typeConverter))
|
||||||
declareThisReceiverParameter(
|
|
||||||
symbolTable,
|
|
||||||
thisType = it.toIrType(typeConverter),
|
|
||||||
thisOrigin = origin,
|
|
||||||
).apply {
|
|
||||||
declarationStorage.leaveScope(this@Fir2IrLazySimpleFunction)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,10 +70,6 @@ class Fir2IrLazySimpleFunction(
|
|||||||
fir.generateOverriddenFunctionSymbols(firParent, session, scopeSession, declarationStorage)
|
fir.generateOverriddenFunctionSymbols(firParent, session, scopeSession, declarationStorage)
|
||||||
}
|
}
|
||||||
|
|
||||||
override var metadata: MetadataSource?
|
|
||||||
get() = null
|
|
||||||
set(_) = error("We should never need to store metadata of external declarations.")
|
|
||||||
|
|
||||||
override val containerSource: DeserializedContainerSource?
|
override val containerSource: DeserializedContainerSource?
|
||||||
get() = fir.containerSource
|
get() = fir.containerSource
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user