Kotlin: Fix the return type for lambda constructors

This commit is contained in:
Ian Lynagh
2024-09-27 11:21:40 +01:00
parent 08be35fc2c
commit 2a5b48930a

View File

@@ -9017,7 +9017,7 @@ open class KotlinFileExtractor(
tw.writeHasLocation(id, locId)
// Extract constructor
val unitType = useType(pluginContext.irBuiltIns.unitType)
val unitType = useType(pluginContext.irBuiltIns.unitType, TypeContext.RETURN)
tw.writeConstrs(ids.constructor, "", "", unitType.javaResult.id, id, ids.constructor)
tw.writeConstrsKotlinType(ids.constructor, unitType.kotlinResult.id)
tw.writeHasLocation(ids.constructor, locId)