Skip to content

Commit 0724caf

Browse files
Kotlin: address KT-86046
Kotlin 2.4.20-RC marks public K1 APIs with K1Deprecation under KT-86046 and rejects the previous repeatable-annotation IR access path. Opt in to K1Deprecation for 2.4.20 and later, and use the existing annotationClass compatibility extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c1b4fe6 commit 0724caf

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

java/kotlin-extractor/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ kt_javac_options(
107107
("IrSymbolInternals" if version_less(v, "2.0.0") else "UnsafeDuringIrConstructionAPI"),
108108
] + (
109109
[] if version_less(v, "2.2.20") else ["org.jetbrains.kotlin.DeprecatedForRemovalCompilerApi"]
110+
) + (
111+
[] if version_less(v, "2.4.20") else ["org.jetbrains.kotlin.K1Deprecation"]
110112
),
111113
x_suppress_version_warnings = True,
112114
),

java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ class MetaAnnotationSupport(
9696
val metaAnnotations = annotationClass.annotations
9797
val jvmRepeatable =
9898
metaAnnotations.find {
99-
it.symbol.owner.parentAsClass.fqNameWhenAvailable ==
100-
JvmAnnotationNames.REPEATABLE_ANNOTATION
99+
it.annotationClass.fqNameWhenAvailable == JvmAnnotationNames.REPEATABLE_ANNOTATION
101100
}
102101
return if (jvmRepeatable != null) {
103102
((jvmRepeatable.codeQlGetValueArgument(0) as? IrClassReference)?.symbol as? IrClassSymbol)

0 commit comments

Comments
 (0)