Clean up backend.common.ir.IrUtils.kt
This commit is contained in:
+5
-3
@@ -36,18 +36,20 @@ abstract class IrLazyFunctionBase(
|
||||
|
||||
override var dispatchReceiverParameter: IrValueParameter? by lazyVar {
|
||||
typeTranslator.buildWithScope(this) {
|
||||
descriptor.dispatchReceiverParameter?.generateReceiverParameterStub()
|
||||
descriptor.dispatchReceiverParameter?.generateReceiverParameterStub()?.also { it.parent = this@IrLazyFunctionBase }
|
||||
}
|
||||
}
|
||||
override var extensionReceiverParameter: IrValueParameter? by lazyVar {
|
||||
typeTranslator.buildWithScope(this) {
|
||||
descriptor.extensionReceiverParameter?.generateReceiverParameterStub()
|
||||
descriptor.extensionReceiverParameter?.generateReceiverParameterStub()?.also { it.parent = this@IrLazyFunctionBase }
|
||||
}
|
||||
}
|
||||
|
||||
override val valueParameters: MutableList<IrValueParameter> by lazy {
|
||||
typeTranslator.buildWithScope(this) {
|
||||
descriptor.valueParameters.mapTo(arrayListOf()) { stubGenerator.generateValueParameterStub(it) }
|
||||
descriptor.valueParameters.mapTo(arrayListOf()) {
|
||||
stubGenerator.generateValueParameterStub(it).apply { parent = this@IrLazyFunctionBase }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,13 @@ fun ClassifierDescriptor.toIrType(hasQuestionMark: Boolean = false, symbolTable:
|
||||
return IrSimpleTypeImpl(defaultType, symbol, hasQuestionMark, listOf(), listOf())
|
||||
}
|
||||
|
||||
val IrTypeParameter.defaultType: IrType get() = symbol.owner.defaultType
|
||||
val IrTypeParameter.defaultType: IrType
|
||||
get() = IrSimpleTypeImpl(
|
||||
symbol,
|
||||
hasQuestionMark = false,
|
||||
arguments = emptyList(),
|
||||
annotations = emptyList()
|
||||
)
|
||||
|
||||
fun IrClassifierSymbol.typeWith(vararg arguments: IrType): IrSimpleType = typeWith(arguments.toList())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user