Kotlin: Fix findTopLevelPropertyOrWarn for K2 compiler - #21915
Conversation
7df1c4f to
36e0035
Compare
36e0035 to
678ae7d
Compare
andersfugmann
left a comment
There was a problem hiding this comment.
Thanks for submitting
The approach and solution is sound and looks good. Also thanks for adding tests.
I added one comment on making the filter slightly more readable.
If you could address that comment and rebase on latest main, this will be good to merge.
Hi @andersfugmann, thanks for the review. I don't see your comment in the GitHub UI, could you send a link? (Presumably for I'll try and get to this before the weekend. Thanks again |
|
My bad. Forgot to submit the comment :-) |
`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 Assisted-by: Claude Fable 5.1 - convert to 'when'; re-review
678ae7d to
19dc506
Compare
|
Internal tests shows no blockers to merge; small reduction in alerts on |
|
Thanks for addressing the comments. All tests looks good. |
Note
Assisted-by: Claude Opus 4.8 - diagnostics & initial fix
or PendingIntent.FLAG_IMMUTABLE- see the issue for more detailsReceiver::class.javaresolves differently from K1:getJavaClass(KClass)- value argumentKClass.<get-java>()- property receiverThis caused the lookup to fail, so
Intent(context, Receiver::class.java)dropped the second argument.This caused false positives in
java/android/implicit-pendingintents