New J2K: Do not call useless cast on null expression on post processing
This commit is contained in:
committed by
Ilya Kirillov
parent
54bd077994
commit
b81696947c
@@ -241,6 +241,7 @@ object NewJ2KPostProcessingRegistrar {
|
||||
RemoveRedundantExpressionQualifierProcessing(),
|
||||
|
||||
registerDiagnosticBasedProcessing<KtBinaryExpressionWithTypeRHS>(Errors.USELESS_CAST) { element, _ ->
|
||||
if (element.left.isNullExpression()) return@registerDiagnosticBasedProcessing
|
||||
val expression = RemoveUselessCastFix.invoke(element)
|
||||
|
||||
val variable = expression.parent as? KtProperty
|
||||
|
||||
Reference in New Issue
Block a user