KT-13170 related: correct handling of inspection parameters in additional checker
(cherry picked from commit 47fd990)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
ff2f49fa8f
commit
17c824f7f2
@@ -38,7 +38,11 @@ class HasPlatformTypeInspection(
|
||||
@JvmField var reportPlatformArguments: Boolean = false
|
||||
) : IntentionBasedInspection<KtCallableDeclaration>(
|
||||
intention,
|
||||
{ intention.dangerousFlexibleTypeOrNull(it, publicAPIOnly, reportPlatformArguments) != null }
|
||||
{ element, inspection ->
|
||||
with(inspection as HasPlatformTypeInspection) {
|
||||
intention.dangerousFlexibleTypeOrNull(element, this.publicAPIOnly, this.reportPlatformArguments) != null
|
||||
}
|
||||
}
|
||||
) {
|
||||
|
||||
override val problemHighlightType = ProblemHighlightType.WEAK_WARNING
|
||||
|
||||
@@ -36,7 +36,7 @@ class ConvertLambdaToReferenceInspection(
|
||||
val intention: ConvertLambdaToReferenceIntention = ConvertLambdaToReferenceIntention()
|
||||
) : IntentionBasedInspection<KtLambdaExpression>(
|
||||
intention,
|
||||
{ intention.shouldSuggestToConvert(it) }
|
||||
{ it -> intention.shouldSuggestToConvert(it) }
|
||||
)
|
||||
|
||||
class ConvertLambdaToReferenceIntention : SelfTargetingOffsetIndependentIntention<KtLambdaExpression>(
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
|
||||
class ConvertToStringTemplateInspection : IntentionBasedInspection<KtBinaryExpression>(
|
||||
ConvertToStringTemplateIntention(),
|
||||
{ ConvertToStringTemplateIntention().shouldSuggestToConvert(it) }
|
||||
{ it -> ConvertToStringTemplateIntention().shouldSuggestToConvert(it) }
|
||||
)
|
||||
|
||||
class ConvertToStringTemplateIntention : SelfTargetingOffsetIndependentIntention<KtBinaryExpression>(KtBinaryExpression::class.java, "Convert concatenation to template") {
|
||||
|
||||
@@ -29,7 +29,7 @@ class RemoveSetterParameterTypeInspection(
|
||||
val intention: RemoveExplicitTypeIntention = RemoveExplicitTypeIntention()
|
||||
) : IntentionBasedInspection<KtCallableDeclaration>(
|
||||
intention,
|
||||
{ intention.isSetterParameter(it) }
|
||||
{ it -> intention.isSetterParameter(it) }
|
||||
) {
|
||||
override val problemHighlightType = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user