[FIR] Add TODO for deprecation and fix of error-level nullable arguments of warning-level annotated Java type

#KT-56989
#KT-63208
This commit is contained in:
Kirill Rakhman
2023-11-06 15:18:57 +01:00
committed by Space Team
parent 2005446296
commit ed53d45307
@@ -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)