mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
[kotlin] Clean up type provider deprecations in Analysis API usages
^KT-68884 GitOrigin-RevId: 12ca6e22249cffbc2afcb4cd62a197d323b1d121
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9c7e738f14
commit
a4810f4939
@@ -198,13 +198,13 @@ internal class ForbiddenInSuspectContextMethodInspection : LocalInspectionTool()
|
||||
return buildList<LocalQuickFix> {
|
||||
add(ReplaceInvokeLaterWithWithContextQuickFix(callExpression))
|
||||
|
||||
val implicitReceiverTypesAtPosition = getImplicitReceiverTypesAtPosition(callExpression)
|
||||
val implicitReceiverTypesAtPosition = collectImplicitReceiverTypes(callExpression)
|
||||
val coroutineScopeClass = ClassId.topLevel(FqName(COROUTINE_SCOPE))
|
||||
val hasCoroutineScope = implicitReceiverTypesAtPosition.any { type ->
|
||||
type is KaUsualClassType &&
|
||||
(
|
||||
type.classId == coroutineScopeClass ||
|
||||
type.getAllSuperTypes().any { superType -> superType is KaUsualClassType && superType.classId == coroutineScopeClass }
|
||||
type.allSupertypes.any { superType -> superType is KaUsualClassType && superType.classId == coroutineScopeClass }
|
||||
)
|
||||
}
|
||||
if (hasCoroutineScope) {
|
||||
|
||||
Reference in New Issue
Block a user