"Remove redundant toString": fix false positive for nested nullable
So #KT-24557 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
4038d4d507
commit
8969e7a6e1
+5
-3
@@ -82,9 +82,11 @@ class RemoveRedundantCallsOfConversionMethodsIntention : SelfTargetingRangeInten
|
||||
Boolean::class.qualifiedName
|
||||
} else {
|
||||
resolvedCall?.candidateDescriptor?.returnType?.let {
|
||||
if (it.isFlexible()) null
|
||||
else if (it.isMarkedNullable && parent !is KtSafeQualifiedExpression) null
|
||||
else it.getFqNameAsString()
|
||||
when {
|
||||
it.isFlexible() -> null
|
||||
parent !is KtSafeQualifiedExpression && (this is KtSafeQualifiedExpression || it.isMarkedNullable) -> null
|
||||
else -> it.getFqNameAsString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user