◐ Shell
clean mode source ↗

Kotlin: Fix findTopLevelPropertyOrWarn for K2 compiler by david-allison · Pull Request #21915 · github/codeql

@david-allison

`Receiver::class.java` resolves differently from K1:

K1: getJavaClass(KClass) - value argument
K2: KClass.<get-java>() - property receiver

This caused the lookup to fail, so
`Intent(context, Receiver::class.java)` dropped the second argument.

log:
"Couldn't find JVM intrinsic property kotlin.jvm java in kotlin.jvm.JvmClassMappingKt"

This caused false positives in `java/android/implicit-pendingintents`

The fix mirrors 5c36e63

Fixes github#20153
Assisted-by: Claude Opus 4.8 - diagnostics & initial fix