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

Skip to content

Commit b926521

Browse files
smowtonigfoo
authored andcommitted
Only write arrays table on first usage
1 parent 055e9b7 commit b926521

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,10 @@ class X {
511511

512512
((s.isArray() || s.isNullableArray()) && s.arguments.isNotEmpty()) || s.isPrimitiveArray() -> {
513513
// TODO: fix this, this is only a dummy implementation to let the tests pass
514-
val elementType = useType(s.getArrayElementType(pluginContext.irBuiltIns))
515-
val id = tw.getLabelFor<DbArray>("@\"array;1;{$elementType}\"")
516-
tw.writeArrays(id, "ARRAY", elementType.javaResult.id, elementType.kotlinResult.id, 1, elementType.javaResult.id, elementType.kotlinResult.id)
514+
val elementType = useTypeOld(s.getArrayElementType(pluginContext.irBuiltIns))
515+
val id = tw.getLabelFor<DbArray>("@\"array;1;{$elementType}\"") {
516+
tw.writeArrays(id, "ARRAY", elementType.javaResult.id, elementType.kotlinResult.id, 1, elementType.javaResult.id, elementType.kotlinResult.id)
517+
}
517518
val javaSignature = "an array" // TODO: Wrong
518519
val javaResult = TypeResult(id, javaSignature)
519520
val aClassId = makeClass("kotlin", "Array") // TODO: Wrong

0 commit comments

Comments
 (0)