mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Kotlin: fix array iterator extraction to work outside of for loops
This commit is contained in:
@@ -2177,7 +2177,7 @@ open class KotlinFileExtractor(
|
||||
extractRawMethodAccess(getter, c, callable, parent, idx, enclosingStmt, listOf(), null, ext, typeArguments)
|
||||
}
|
||||
}
|
||||
isFunction(target, "kotlin", "(some array type)", { isArrayType(it) }, "iterator") && c.origin == IrStatementOrigin.FOR_LOOP_ITERATOR -> {
|
||||
isFunction(target, "kotlin", "(some array type)", { isArrayType(it) }, "iterator") -> {
|
||||
findTopLevelFunctionOrWarn("kotlin.jvm.internal.iterator", "kotlin.jvm.internal.ArrayIteratorKt", c)?.let { iteratorFn ->
|
||||
val dispatchReceiver = c.dispatchReceiver
|
||||
if (dispatchReceiver == null) {
|
||||
|
||||
Reference in New Issue
Block a user