psi2ir: Use substituted 'hashCopy' for generated data class 'hashCopy'

This commit is contained in:
Dmitry Petrov
2018-05-29 17:28:57 +03:00
parent cb301763f3
commit 7a2bb79777
4 changed files with 121 additions and 13 deletions
@@ -16,6 +16,7 @@
package org.jetbrains.kotlin.ir.builders
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
import org.jetbrains.kotlin.descriptors.VariableDescriptor
import org.jetbrains.kotlin.ir.IrElement
@@ -154,6 +155,13 @@ fun IrBuilderWithScope.irCall(
fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol): IrCall =
irCall(callee, callee.descriptor.returnType!!)
fun IrBuilderWithScope.irCall(
calleeSymbol: IrFunctionSymbol,
calleeDescriptor: FunctionDescriptor,
typeArguments: Map<TypeParameterDescriptor, KotlinType>? = null
): IrCall =
IrCallImpl(startOffset, endOffset, calleeDescriptor.returnType!!, calleeSymbol, calleeDescriptor, typeArguments)
fun IrBuilderWithScope.irCallOp(callee: IrFunctionSymbol, dispatchReceiver: IrExpression, argument: IrExpression): IrCall =
irCall(callee, callee.descriptor.returnType!!).apply {
this.dispatchReceiver = dispatchReceiver