Fix "remove explicit type arguments" in J2K
Do not delete type arguments if intention is not applicable just befor
This commit is contained in:
@@ -179,7 +179,11 @@ object J2KPostProcessingRegistrar {
|
||||
override fun createAction(element: KtElement, diagnostics: Diagnostics): (() -> Unit)? {
|
||||
if (element !is KtTypeArgumentList || !RemoveExplicitTypeArgumentsIntention.isApplicableTo(element, approximateFlexible = true)) return null
|
||||
|
||||
return { element.delete() }
|
||||
return {
|
||||
if (RemoveExplicitTypeArgumentsIntention.isApplicableTo(element, approximateFlexible = true)) {
|
||||
element.delete()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user