Fix of EA-105681 in KotlinRunLineMarkerContributor

This commit is contained in:
Mikhail Glukhikh
2017-08-11 14:00:48 +03:00
committed by Mikhail Glukhikh
parent 165707c46c
commit 830b543879
2 changed files with 7 additions and 6 deletions
@@ -22,7 +22,7 @@ import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.idea.KotlinIcons
import org.jetbrains.kotlin.idea.MainFunctionDetector
import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptor
import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny
import org.jetbrains.kotlin.psi.KtNamedFunction
@@ -32,8 +32,8 @@ class KotlinRunLineMarkerContributor : RunLineMarkerContributor() {
if (function.nameIdentifier != element) return null
val detector = MainFunctionDetector { function ->
function.resolveToDescriptor() as FunctionDescriptor
val detector = MainFunctionDetector { someFunction ->
someFunction.resolveToDescriptorIfAny() as? FunctionDescriptor
}
if (detector.isMain(function)) {