NI: exclude reporting of an unsafe call diagnostic for implicit invoke after safe call in cases when invoke has type parameters (make NI and OI consistent)
^KT-37579 Fixed
This commit is contained in:
+1
-1
@@ -486,7 +486,7 @@ private fun KotlinResolutionCandidate.checkUnsafeImplicitInvokeAfterSafeCall(arg
|
||||
}
|
||||
} ?: error("Receiver kind does not match receiver argument")
|
||||
|
||||
if (receiverArgument.isSafeCall && receiverArgument.receiver.stableType.isNullable()) {
|
||||
if (receiverArgument.isSafeCall && receiverArgument.receiver.stableType.isNullable() && resolvedCall.candidateDescriptor.typeParameters.isEmpty()) {
|
||||
addDiagnostic(UnsafeCallError(argument, isForImplicitInvoke = true))
|
||||
return ImplicitInvokeCheckStatus.UNSAFE_INVOKE_REPORTED
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user