Review changes: revert compiler behaviour, add test, remove inner classes
This commit is contained in:
committed by
Nikolay Krasko
parent
6ba134b1be
commit
213b98fefe
+2
-1
@@ -34,6 +34,7 @@ import org.jetbrains.kotlin.resolve.scopes.DescriptorKindExclude
|
||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.decapitalizeSmart
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.decapitalizeSmartForCompiler
|
||||
import java.util.*
|
||||
|
||||
data class ReferenceVariants(val imported: Collection<DeclarationDescriptor>, val notImportedExtensions: Collection<CallableDescriptor>)
|
||||
@@ -121,7 +122,7 @@ class ReferenceVariantsCollector(
|
||||
|
||||
val getOrSetPrefix = GET_SET_PREFIXES.firstOrNull { prefix.startsWith(it) }
|
||||
val additionalPropertyNameFilter: ((String) -> Boolean)? = getOrSetPrefix
|
||||
?.let { prefixMatcher.cloneWithPrefix(prefix.removePrefix(getOrSetPrefix).decapitalizeSmart()).asStringNameFilter() }
|
||||
?.let { prefixMatcher.cloneWithPrefix(prefix.removePrefix(getOrSetPrefix).decapitalizeSmartForCompiler()).asStringNameFilter() }
|
||||
|
||||
val shadowedDeclarationsFilter = if (runtimeReceiver != null)
|
||||
ShadowedDeclarationsFilter(bindingContext, resolutionFacade, nameExpression, runtimeReceiver)
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun a() {
|
||||
val SOME_CONSTANT = 1
|
||||
<selection>SOME_CONSTANT</selection>
|
||||
}
|
||||
/*
|
||||
constant
|
||||
i
|
||||
someConstant
|
||||
*/
|
||||
+2
@@ -38,6 +38,8 @@ class KotlinNameSuggesterTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
|
||||
fun testNameReferenceExpression() = doTest()
|
||||
|
||||
fun testNameReferenceExpressionForConstants() = doTest()
|
||||
|
||||
fun testNameString() = doTest()
|
||||
|
||||
fun testAnonymousObject() = doTest()
|
||||
|
||||
Reference in New Issue
Block a user