Fix: use void as constructor return types in their labels

Without this we're incompatible with the Java extractor's constructor labelling
This commit is contained in:
Chris Smowton
2022-01-07 18:55:04 +00:00
committed by Ian Lynagh
parent 5188998bc6
commit ab449e0517

View File

@@ -546,7 +546,8 @@ class X {
params
}
val paramTypeIds = allParams.joinToString { "{${useType(erase(it.type)).javaResult.id}}" }
val returnTypeId = useType(erase(returnType)).javaResult.id
val labelReturnType = if (name == "<init>") pluginContext.irBuiltIns.unitType else erase(returnType)
val returnTypeId = useType(labelReturnType, TypeContext.RETURN).javaResult.id
return "@\"callable;{$parentId}.$name($paramTypeIds){$returnTypeId}\""
}