Ensure <obinit>'s return type is void not Unit

This commit is contained in:
Chris Smowton
2022-06-23 16:25:46 +01:00
parent af5230349b
commit 3cf7f96298

View File

@@ -371,7 +371,7 @@ open class KotlinFileExtractor(
// add method:
val obinitLabel = getObinitLabel(c)
val obinitId = tw.getLabelFor<DbMethod>(obinitLabel)
val returnType = useType(pluginContext.irBuiltIns.unitType)
val returnType = useType(pluginContext.irBuiltIns.unitType, TypeContext.RETURN)
tw.writeMethods(obinitId, "<obinit>", "<obinit>()", returnType.javaResult.id, parentId, obinitId)
tw.writeMethodsKotlinType(obinitId, returnType.kotlinResult.id)