diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/HasPlatformTypeInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/HasPlatformTypeInspection.kt index 9022720e084..d511f3cc0dc 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/HasPlatformTypeInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/HasPlatformTypeInspection.kt @@ -47,7 +47,8 @@ class HasPlatformTypeInspection( override val problemHighlightType = ProblemHighlightType.WEAK_WARNING - override val problemText = "Declaration has platform type. Make the type explicit to prevent subtle bugs." + override val problemText = "Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. " + + "Specify type explicitly as nullable or non-nullable." override fun additionalFixes(element: KtCallableDeclaration): List? { val type = SpecifyTypeExplicitlyIntention.dangerousFlexibleTypeOrNull(element, publicAPIOnly, reportPlatformArguments) ?: return null diff --git a/idea/testData/inspections/hasPlatformType/inspectionData/expected.xml b/idea/testData/inspections/hasPlatformType/inspectionData/expected.xml index c3788ec0ee8..6c704244fbd 100644 --- a/idea/testData/inspections/hasPlatformType/inspectionData/expected.xml +++ b/idea/testData/inspections/hasPlatformType/inspectionData/expected.xml @@ -5,7 +5,7 @@ light_idea_test_case Function, property or variable has platform type. - Declaration has platform type. Make the type explicit to prevent subtle bugs. + Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable. function.kt @@ -13,7 +13,7 @@ light_idea_test_case Function or property has platform type - Declaration has platform type. Make the type explicit to prevent subtle bugs. + Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable. property1.kt @@ -21,6 +21,6 @@ light_idea_test_case Function, property or variable has platform type. - Declaration has platform type. Make the type explicit to prevent subtle bugs. + Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable. \ No newline at end of file