FIR: unify common special names scattered around the code base
This commit is contained in:
committed by
teamcityserver
parent
263b876e6e
commit
684ef871ee
+2
-1
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.ir.types.impl.*
|
||||
import org.jetbrains.kotlin.ir.util.*
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.name.SpecialNames
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyExternal
|
||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
@@ -259,7 +260,7 @@ class IrDescriptorBasedFunctionFactory(
|
||||
buildSimpleType()
|
||||
}
|
||||
val vDeclaration = irFactory.createValueParameter(
|
||||
offset, offset, classOrigin, vSymbol, Name.special("<this>"), -1, type, null,
|
||||
offset, offset, classOrigin, vSymbol, SpecialNames.THIS, -1, type, null,
|
||||
isCrossinline = false,
|
||||
isNoinline = false,
|
||||
isHidden = false,
|
||||
|
||||
@@ -58,12 +58,10 @@ val IrClass.classId: ClassId?
|
||||
val IrDeclaration.nameForIrSerialization: Name
|
||||
get() = when (this) {
|
||||
is IrDeclarationWithName -> this.name
|
||||
is IrConstructor -> SPECIAL_INIT_NAME
|
||||
is IrConstructor -> SpecialNames.INIT
|
||||
else -> error(this)
|
||||
}
|
||||
|
||||
private val SPECIAL_INIT_NAME = Name.special("<init>")
|
||||
|
||||
val IrValueParameter.isVararg get() = this.varargElementType != null
|
||||
|
||||
val IrFunction.isSuspend get() = this is IrSimpleFunction && this.isSuspend
|
||||
|
||||
Reference in New Issue
Block a user