Introduce KtNamedFunction.resolveToDescriptorIfAny()

This commit is contained in:
Mikhail Glukhikh
2018-02-20 18:01:05 +03:00
parent 5848bc9a44
commit 513376e5f0
16 changed files with 19 additions and 26 deletions
@@ -44,7 +44,7 @@ private class KotlinNodeJsRunConfigurationProducer :
val project = psiFile.project
if (psiElement is KtNamedFunction) {
val detector = MainFunctionDetector { it.resolveToDescriptorIfAny() as? FunctionDescriptor }
val detector = MainFunctionDetector { it.resolveToDescriptorIfAny() }
if (!detector.isMain(psiElement, false)) return false
}
else if (!TestElementPath.isModuleAssociatedDir(psiElement, jsModule)) return false