diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt index b62f89bedc2..d2be0dcd83a 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt @@ -40,6 +40,10 @@ import org.jetbrains.kotlin.utils.addIfNotNull import java.util.* import kotlin.properties.Delegates +fun canBePropertyAccessor(identifier: String): Boolean { + return identifier.startsWith("get") || identifier.startsWith("is") || identifier.startsWith("set") +} + interface SyntheticJavaPropertyDescriptor : PropertyDescriptor { val getMethod: FunctionDescriptor val setMethod: FunctionDescriptor? @@ -49,7 +53,7 @@ interface SyntheticJavaPropertyDescriptor : PropertyDescriptor { val name = getterOrSetter.name if (name.isSpecial) return null val identifier = name.identifier - if (!identifier.startsWith("get") && !identifier.startsWith("is") && !identifier.startsWith("set")) return null // optimization + if (!canBePropertyAccessor(identifier)) return null // optimization val classDescriptorOwner = getterOrSetter.containingDeclaration as? ClassDescriptor ?: return null diff --git a/idea/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinPropertyAccessorsReferenceSearcher.kt b/idea/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinPropertyAccessorsReferenceSearcher.kt index a3a2c5fa510..e168f70d499 100644 --- a/idea/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinPropertyAccessorsReferenceSearcher.kt +++ b/idea/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinPropertyAccessorsReferenceSearcher.kt @@ -31,6 +31,7 @@ import org.jetbrains.kotlin.psi.KtProperty import org.jetbrains.kotlin.storage.LockBasedStorageManager import org.jetbrains.kotlin.synthetic.JavaSyntheticPropertiesScope import org.jetbrains.kotlin.synthetic.SyntheticJavaPropertyDescriptor +import org.jetbrains.kotlin.synthetic.canBePropertyAccessor class KotlinPropertyAccessorsReferenceSearcher : QueryExecutorBase(true) { override fun processQuery(queryParameters: MethodReferencesSearch.SearchParameters, consumer: Processor) { @@ -54,6 +55,7 @@ class KotlinPropertyAccessorsReferenceSearcher : QueryExecutorBase