All projects

Upstream commits

kotlin

JetBrains/kotlin

View on GitHub

1 commit

  1. [FIR] Fix DEPRECATED_JAVA_ANNOTATION false positive with arguments
    `java.lang.Deprecated` carries `since` and `forRemoval`, neither of which `kotlin.Deprecated` can represent, so the suggested migration silently drops them. For `forRemoval = true` the loss is observable: a Java caller of the migrated declaration gets javac's `[deprecation]` warning where it previously got `[removal]`. Skip the report for `java.lang.Deprecated` as soon as any argument is explicitly passed. It declares only `since` and `forRemoval`, so any explicit argument means the source is using a Java-specific member that `kotlin.Deprecated` cannot represent; KT-33232 reports `forRemoval = false` as a false positive too. The argument-less form keeps warning, because there both annotations make javac report the same `[deprecation]` lint category. `Target`, `Retention` and `Documented` are left untouched, since their Kotlin counterparts do accept the corresponding arguments. The change is limited to the K2 checker. K1's `JavaAnnotationCallChecker` is left unchanged. ^KT-33232 Fixed

Updated daily, last on 2026-11-16. By Christian Aurich Zanettini Martins · All projects