Support Unit/V types in string-concat indy calls

unitComponent.kt test fails with JVM target 9+
This commit is contained in:
Mikhael Bogdanov
2021-02-17 11:07:28 +01:00
parent e3e7e6b740
commit 134fda8bad
5 changed files with 49 additions and 2 deletions
@@ -1283,8 +1283,9 @@ class ExpressionCodegen(
generator.putValueOrProcessConstant(StackValue.constant(arg.value, type, null))
} else {
val value = arg.accept(this, data)
value.materializeAt(value.type, value.irType)
generator.invokeAppend(value.type)
val generatingType = if (value.type == Type.VOID_TYPE) AsmTypes.UNIT_TYPE else value.type
value.materializeAt(generatingType, value.irType)
generator.invokeAppend(generatingType)
}
}
generator.genToString()