Postpone ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated

The main reason is a bug in deserialization(KT-55357) that doesn't allow
to deserialize some binaries compiled with that feature enabled.

While we might fix it in 1.8.0, it doesn't help because previous
compilers, e.g. 1.7.0 still may break when using freshly recompiled
libraries.

Considering, that almost any meaningful fix might look unsafe for
the almost released 1.8.0, we can't enable the feature even in 1.9,
because 1.8.0 compilers wouldn't read those libraries anyway.

So, effectively this feature will be only enabled in K2.

^KT-55357 Related
^KT-36770 Related
This commit is contained in:
Denis.Zharkov
2022-12-08 12:20:32 +01:00
committed by Space Team
parent 36591ab8a0
commit d34bd2e8c0
@@ -239,7 +239,6 @@ enum class LanguageFeature(
// 1.8
DontLoseDiagnosticsDuringOverloadResolutionByReturnType(KOTLIN_1_8),
ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated(KOTLIN_1_8, kind = BUG_FIX), // KT-36770
ProhibitConfusingSyntaxInWhenBranches(KOTLIN_1_8, kind = BUG_FIX), // KT-48385
UseConsistentRulesForPrivateConstructorsOfSealedClasses(sinceVersion = KOTLIN_1_8, kind = BUG_FIX), // KT-44866
ProgressionsChangingResolve(KOTLIN_1_8), // KT-49276
@@ -285,6 +284,11 @@ enum class LanguageFeature(
ValueClassesSecondaryConstructorWithBody(sinceVersion = KOTLIN_1_9, kind = UNSTABLE_FEATURE), // KT-55333
// This feature effectively might be removed because we decided to disable it until K2 and there it will be unconditionally enabled.
// But we leave it here just to minimize the changes in K1 and also to allow use the feature once somebody needs it.
// The reason for it's being disabled is described at KT-55357
ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated(sinceVersion = null), // KT-36770
// Disabled for indefinite time. See KT-53751
IgnoreNullabilityForErasedValueParameters(sinceVersion = null, kind = BUG_FIX),