Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab449e0

Browse files
smowtonigfoo
authored andcommitted
Fix: use void as constructor return types in their labels
Without this we're incompatible with the Java extractor's constructor labelling
1 parent 5188998 commit ab449e0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,8 @@ class X {
546546
params
547547
}
548548
val paramTypeIds = allParams.joinToString { "{${useType(erase(it.type)).javaResult.id}}" }
549-
val returnTypeId = useType(erase(returnType)).javaResult.id
549+
val labelReturnType = if (name == "<init>") pluginContext.irBuiltIns.unitType else erase(returnType)
550+
val returnTypeId = useType(labelReturnType, TypeContext.RETURN).javaResult.id
550551
return "@\"callable;{$parentId}.$name($paramTypeIds){$returnTypeId}\""
551552
}
552553

0 commit comments

Comments
 (0)