Fix false positive ENCLOSING_SUSPEND_FUNCTION_FOR_SUSPEND_FUNCTION_CALL
Previously added additional processing at findEnclosingSuspendFunction seems unnecessary anymore ^KT-43258 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
803d47daaa
commit
0b0a6d6ede
+2
-2
@@ -26,7 +26,7 @@ class SuspensionPointInsideMutexLockChecker : CallChecker {
|
||||
if (descriptor !is FunctionDescriptor || !descriptor.isSuspend) return
|
||||
|
||||
val enclosingSuspendFunctionSource =
|
||||
findEnclosingSuspendFunction(context, resolvedCall.call.callElement)?.source?.getPsi() ?: return
|
||||
findEnclosingSuspendFunction(context)?.source?.getPsi() ?: return
|
||||
|
||||
// Search for `synchronized` call
|
||||
var parent = reportOn
|
||||
@@ -78,4 +78,4 @@ class SuspensionPointInsideMutexLockChecker : CallChecker {
|
||||
private fun reportProblem(context: CallCheckerContext, reportOn: PsiElement, resolvedCall: ResolvedCall<*>) {
|
||||
context.trace.report(ErrorsJvm.SUSPENSION_POINT_INSIDE_CRITICAL_SECTION.on(reportOn, resolvedCall.resultingDescriptor))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user