From 978fc468fac6f203fd822ea036e6e39bd193f54d Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Tue, 22 Mar 2016 12:00:30 +0300 Subject: [PATCH] Temporary fix --- .../jetbrains/kotlin/idea/intentions/loopToCallChain/utils.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/utils.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/utils.kt index 528e012b3c1..1851e50f680 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/utils.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/utils.kt @@ -78,7 +78,9 @@ fun KtExpression?.isSimpleName(name: Name): Boolean { } fun KtCallableDeclaration.hasUsages(inElements: Collection): Boolean { - return ReferencesSearch.search(this, LocalSearchScope(inElements.toTypedArray())).any() + // TODO: it's a temporary workaround about strange dead-lock when running inspections + return inElements.any { ReferencesSearch.search(this, LocalSearchScope(it)).any() } +// return ReferencesSearch.search(this, LocalSearchScope(inElements.toTypedArray())).any() } fun KtProperty.hasWriteUsages(): Boolean {