Kotlin: Fix array indexer extraction

This commit is contained in:
Tamas Vajk
2022-09-01 11:12:14 +02:00
parent afeea64078
commit a5415c9c8a
3 changed files with 5 additions and 4 deletions

View File

@@ -2185,7 +2185,7 @@ open class KotlinFileExtractor(
}
}
}
isFunction(target, "kotlin", "(some array type)", { isArrayType(it) }, "get") && c.origin == IrStatementOrigin.GET_ARRAY_ELEMENT -> {
isFunction(target, "kotlin", "(some array type)", { isArrayType(it) }, "get") && c.origin == IrStatementOrigin.GET_ARRAY_ELEMENT && c.dispatchReceiver != null -> {
val id = tw.getFreshIdLabel<DbArrayaccess>()
val type = useType(c.type)
tw.writeExprs_arrayaccess(id, type.javaResult.id, parent, idx)