IR: remove unneeded casts after making IrCall's symbol a simple function

This commit is contained in:
Alexander Udalov
2020-08-14 12:28:49 +02:00
parent 3bdbfc1e73
commit 9961bd1fe1
11 changed files with 18 additions and 39 deletions
@@ -5,7 +5,6 @@
package org.jetbrains.kotlin.ir.builders
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.declarations.*
import org.jetbrains.kotlin.ir.expressions.*
@@ -278,14 +277,6 @@ fun IrBuilderWithScope.irCall(callee: IrConstructorSymbol): IrConstructorCall =
fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol): IrFunctionAccessExpression =
irCall(callee, callee.owner.returnType)
fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol, descriptor: FunctionDescriptor, type: IrType): IrCall =
IrCallImpl(
startOffset, endOffset, type,
callee as IrSimpleFunctionSymbol,
valueArgumentsCount = callee.owner.valueParameters.size,
typeArgumentsCount = callee.owner.typeParameters.size
)
fun IrBuilderWithScope.irCall(callee: IrFunction): IrFunctionAccessExpression =
irCall(callee.symbol)