IR: make IrCall take IrSimpleFunctionSymbol

This commit is contained in:
Georgy Bronnikov
2020-08-10 13:02:44 +03:00
parent 4901cdb11f
commit 18ae665d41
30 changed files with 124 additions and 100 deletions
@@ -288,10 +288,10 @@ class CallAndReferenceGenerator(
val startOffset = adapteeFunction.startOffset
val endOffset = adapteeFunction.endOffset
val type = adapteeFunction.returnType
val irCall =
if (adapteeSymbol is IrConstructorSymbol) {
val irCall = when (adapteeSymbol) {
is IrConstructorSymbol ->
IrConstructorCallImpl.fromSymbolOwner(startOffset, endOffset, type, adapteeSymbol)
} else {
is IrSimpleFunctionSymbol ->
IrCallImpl(
startOffset,
endOffset,
@@ -302,7 +302,9 @@ class CallAndReferenceGenerator(
origin = null,
superQualifierSymbol = null
)
}
else ->
error("unknown callee kind: ${adapteeFunction.render()}")
}
if (boundDispatchReceiver != null || boundExtensionReceiver != null) {
val receiverValue = IrGetValueImpl(