K2: delay jspecify strict mode introduction to version 2.1

Related to KT-62352, KT-55586
This commit is contained in:
Mikhail Glukhikh
2023-11-16 21:26:02 +01:00
committed by Space Team
parent 980708e533
commit 0aa5170ba2
2 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -1,4 +1,7 @@
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected.
a.foo(null)
^
COMPILATION_ERROR
compiler/testData/cli/jvm/jspecifyUsage.kt:3:5: warning: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin.String?'.
a.bar().hashCode()
^
OK
@@ -45,12 +45,12 @@ val NULLABILITY_ANNOTATION_SETTINGS: NullabilityAnnotationStates<JavaNullability
FqName("lombok") to JavaNullabilityAnnotationsStatus.DEFAULT,
JSPECIFY_OLD_ANNOTATIONS_PACKAGE to JavaNullabilityAnnotationsStatus(
reportLevelBefore = ReportLevel.WARN,
sinceVersion = KotlinVersion(2, 0),
sinceVersion = KotlinVersion(2, 1),
reportLevelAfter = ReportLevel.STRICT
),
JSPECIFY_ANNOTATIONS_PACKAGE to JavaNullabilityAnnotationsStatus(
reportLevelBefore = ReportLevel.WARN,
sinceVersion = KotlinVersion(2, 0),
sinceVersion = KotlinVersion(2, 1),
reportLevelAfter = ReportLevel.STRICT
),
RXJAVA3_ANNOTATIONS_PACKAGE to JavaNullabilityAnnotationsStatus(