From ed53d453077cf56971962c8a7f156597124fb3c5 Mon Sep 17 00:00:00 2001 From: Kirill Rakhman Date: Mon, 6 Nov 2023 15:18:57 +0100 Subject: [PATCH] [FIR] Add TODO for deprecation and fix of error-level nullable arguments of warning-level annotated Java type #KT-56989 #KT-63208 --- .../org/jetbrains/kotlin/fir/java/enhancement/javaTypeUtils.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/javaTypeUtils.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/javaTypeUtils.kt index 18cc25803c7..f69e45b0a60 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/javaTypeUtils.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/javaTypeUtils.kt @@ -108,6 +108,8 @@ private fun ConeSimpleKotlinType.enhanceInflexibleType( return if (effectiveQualifiers.isNullabilityQualifierForWarning && enhanced != null) { val newAttributes = attributes.plus(EnhancedTypeForWarningAttribute(enhanced)) + // TODO if the arguments of `enhanced` are error-level annotated, we're losing them here for compatibility with K1, + // a fix requires a deprecation cycle, see KT-63208 if (enhancedTag != lookupTag) { // Handle case when mutability was enhanced and nullability was enhanced for warning. enhancedTag.constructType(typeArguments, isNullable, newAttributes)