Pass LanguageVersionSettings instance to isHiddenInResolution

Unused at the moment, will be used later to check if the API version prohibits
the usage of the element
This commit is contained in:
Alexander Udalov
2016-09-19 14:35:02 +03:00
parent 59b29cf00d
commit 6e0e8c6dc3
7 changed files with 32 additions and 18 deletions
@@ -17,6 +17,7 @@
package org.jetbrains.kotlin.idea.codeInsight
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.config.LanguageVersionSettings
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.idea.resolve.ResolutionFacade
import org.jetbrains.kotlin.idea.resolve.frontendService
@@ -73,7 +74,7 @@ class ReferenceVariantsHelper(
): Collection<DeclarationDescriptor> {
var variants: Collection<DeclarationDescriptor>
= getReferenceVariantsNoVisibilityFilter(contextElement, kindFilter, nameFilter, callTypeAndReceiver, useReceiverType)
.filter { !it.isHiddenInResolution() && visibilityFilter(it) }
.filter { !it.isHiddenInResolution(resolutionFacade.frontendService<LanguageVersionSettings>()) && visibilityFilter(it) }
if (filterOutShadowed) {
ShadowedDeclarationsFilter.create(bindingContext, resolutionFacade, contextElement, callTypeAndReceiver)?.let {