Merge pull request #10255 from tamasvajk/kotlin-array-get-fix

Kotlin: Fix array indexer extraction
This commit is contained in:
Tamás Vajk
2022-09-01 13:28:18 +02:00
committed by GitHub
6 changed files with 79 additions and 1 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)