IR: IrSimpleFunction.isFakeOverride
This commit is contained in:
@@ -28,6 +28,7 @@ interface IrSimpleFunction :
|
||||
val modality: Modality
|
||||
val isTailrec: Boolean
|
||||
val isSuspend: Boolean
|
||||
val isFakeOverride: Boolean
|
||||
|
||||
@Deprecated("Use correspondingPropertySymbol")
|
||||
var correspondingProperty: IrProperty?
|
||||
|
||||
@@ -32,7 +32,8 @@ class IrFunctionImpl(
|
||||
isExternal: Boolean,
|
||||
override val isTailrec: Boolean,
|
||||
override val isSuspend: Boolean,
|
||||
isExpect: Boolean
|
||||
isExpect: Boolean,
|
||||
override val isFakeOverride: Boolean
|
||||
) :
|
||||
IrFunctionBase(startOffset, endOffset, origin, name, visibility, isInline, isExternal, isExpect, returnType),
|
||||
IrSimpleFunction {
|
||||
@@ -55,7 +56,8 @@ class IrFunctionImpl(
|
||||
isExternal = symbol.descriptor.isExternal,
|
||||
isTailrec = symbol.descriptor.isTailrec,
|
||||
isSuspend = symbol.descriptor.isSuspend,
|
||||
isExpect = symbol.descriptor.isExpect
|
||||
isExpect = symbol.descriptor.isExpect,
|
||||
isFakeOverride = origin == IrDeclarationOrigin.FAKE_OVERRIDE
|
||||
)
|
||||
|
||||
override val descriptor: FunctionDescriptor = symbol.descriptor
|
||||
|
||||
@@ -34,6 +34,7 @@ class IrLazyFunction(
|
||||
override val isTailrec: Boolean,
|
||||
override val isSuspend: Boolean,
|
||||
isExpect: Boolean,
|
||||
override val isFakeOverride: Boolean,
|
||||
stubGenerator: DeclarationStubGenerator,
|
||||
typeTranslator: TypeTranslator
|
||||
) :
|
||||
@@ -57,6 +58,7 @@ class IrLazyFunction(
|
||||
isTailrec = symbol.descriptor.isTailrec,
|
||||
isSuspend = symbol.descriptor.isSuspend,
|
||||
isExpect = symbol.descriptor.isExpect,
|
||||
isFakeOverride = origin == IrDeclarationOrigin.FAKE_OVERRIDE,
|
||||
stubGenerator = stubGenerator,
|
||||
typeTranslator = TypeTranslator
|
||||
)
|
||||
|
||||
@@ -169,7 +169,8 @@ open class DeepCopyIrTreeWithSymbols(
|
||||
isExternal = declaration.isExternal,
|
||||
isTailrec = declaration.isTailrec,
|
||||
isSuspend = declaration.isSuspend,
|
||||
isExpect = declaration.isExpect
|
||||
isExpect = declaration.isExpect,
|
||||
isFakeOverride = declaration.isFakeOverride
|
||||
).apply {
|
||||
declaration.overriddenSymbols.mapTo(overriddenSymbols) {
|
||||
symbolRemapper.getReferencedFunction(it) as IrSimpleFunctionSymbol
|
||||
|
||||
@@ -371,7 +371,8 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
|
||||
"inline".takeIf { isInline },
|
||||
"external".takeIf { isExternal },
|
||||
"suspend".takeIf { isSuspend },
|
||||
"expect".takeIf { isExpect }
|
||||
"expect".takeIf { isExpect },
|
||||
"fake_override".takeIf { isFakeOverride }
|
||||
)
|
||||
|
||||
private fun IrFunction.renderTypeParameters(): String =
|
||||
|
||||
Reference in New Issue
Block a user