Skip to content

Commit 8b1a7c8

Browse files
tamasvajksmowton
authored andcommitted
Fix return type of <clinit> methods
1 parent de003fd commit 8b1a7c8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ open class KotlinFileExtractor(
554554
classTypeArgsIncludingOuterClasses = listOf()
555555
)
556556
val clinitId = tw.getLabelFor<DbMethod>(clinitLabel)
557-
val returnType = useType(pluginContext.irBuiltIns.unitType)
557+
val returnType = useType(pluginContext.irBuiltIns.unitType, TypeContext.RETURN)
558558
tw.writeMethods(clinitId, "<clinit>", "<clinit>()", returnType.javaResult.id, parentId, clinitId)
559559
tw.writeMethodsKotlinType(clinitId, returnType.kotlinResult.id)
560560

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| clinit.kt:0:0:0:0 | <clinit> | file:///usr/local/Cellar/kotlin/1.6.20/libexec/lib/kotlin-stdlib.jar/kotlin/Unit.class:0:0:0:0 | Unit |
1+
| clinit.kt:0:0:0:0 | <clinit> | file://:0:0:0:0 | void |

0 commit comments

Comments
 (0)