From eb0c0a88695217351887deeb558fb2c8bc678ff5 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 12 Apr 2017 17:22:28 +0300 Subject: [PATCH] Fix incorrect logic in KotlinJavaScriptLibraryDetectionUtil Previously the lambda almost always returned false, because the library root is never a JS file with metadata, which led to processFilesRecursively always returning false, which led to every library being detected as a Kotlin/JS library here --- .../idea/framework/KotlinJavaScriptLibraryDetectionUtil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/framework/KotlinJavaScriptLibraryDetectionUtil.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/framework/KotlinJavaScriptLibraryDetectionUtil.kt index 928198ee358..640189920c1 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/framework/KotlinJavaScriptLibraryDetectionUtil.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/framework/KotlinJavaScriptLibraryDetectionUtil.kt @@ -43,7 +43,7 @@ object KotlinJavaScriptLibraryDetectionUtil { return hasMetadata } - if (!VfsUtilCore.processFilesRecursively(root, { isJsFileWithMetadata(root) })) { + if (!VfsUtilCore.processFilesRecursively(root) { !isJsFileWithMetadata(it) }) { return true } }