[ir-plugin] Referenced binary operators with the new API

This commit is contained in:
Igor Chevdar
2020-10-22 12:18:11 +05:00
parent 23d12a717e
commit 1a9e516dc0
@@ -109,7 +109,8 @@ interface IrBuilderExtension {
}
fun IrBuilderWithScope.irBinOp(name: Name, lhs: IrExpression, rhs: IrExpression): IrExpression {
val symbol = compilerContext.symbols.getBinaryOperator(name, lhs.type, rhs.type)
val classFqName = (lhs.type as IrSimpleType).classOrNull!!.owner.fqNameWhenAvailable!!
val symbol = compilerContext.referenceFunctions(classFqName.child(name)).single()
return irInvoke(lhs, symbol, rhs)
}