Fix: Unstable IDE navigation to expect/actual symbols in stdlib
Issue #KT-30790 Fixed
This commit is contained in:
+2
-3
@@ -35,7 +35,6 @@ import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.debugText.getDebugText
|
||||
import org.jetbrains.kotlin.resolve.TargetPlatform
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult
|
||||
|
||||
object SourceNavigationHelper {
|
||||
@@ -191,8 +190,8 @@ object SourceNavigationHelper {
|
||||
index: StringStubIndexExtension<T>
|
||||
): T? {
|
||||
val classFqName = entity.fqName ?: return null
|
||||
return targetScopes(entity, navigationKind).firstNotNullResult {
|
||||
index.get(classFqName.asString(), entity.project, it).firstOrNull()
|
||||
return targetScopes(entity, navigationKind).firstNotNullResult { scope ->
|
||||
index.get(classFqName.asString(), entity.project, scope).sortedBy { it.isExpectDeclaration() }.firstOrNull()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user