FIR IDE: Invert the order of the scopes for completion

This way local declarations will be fetched first
This commit is contained in:
Roman Golyshev
2020-09-09 12:09:09 +03:00
parent f748d8cf70
commit 2d4d48b401
@@ -137,7 +137,10 @@ internal class KtFirScopeProvider(
firLocalScopes.mapTo(this, ::convertToKtScope)
}
KtScopeContext(getCompositeScope(allKtScopes), implicitReceiversTypes)
KtScopeContext(
getCompositeScope(allKtScopes.asReversed()),
implicitReceiversTypes.asReversed()
)
}
private fun KtFile.findFunctionDeclarationAt(offset: Int): KtNamedFunction? =