From 06eea5324607583a39a3864aa92bb1ea6cd8269b Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Tue, 30 Aug 2016 20:15:23 +0300 Subject: [PATCH] Fixed bug with class using data class as type parameter in supers list --- .../destructuringDeclarationUsages.kt | 71 ++++++++++++------- .../kotlin/conventions/components/SAM.log | 1 - .../components/callableReferences.log | 1 - .../components/companionObjectAccess.log | 1 - .../componentFunForGenericType1.log | 1 - .../componentFunForGenericType2.log | 1 - .../conventions/components/dataClass.0.java | 2 - .../conventions/components/dataClass.0.kt | 2 +- .../conventions/components/dataClass.1.java | 6 ++ .../conventions/components/dataClass.1.kt | 5 ++ .../conventions/components/dataClass.2.java | 6 ++ .../conventions/components/dataClass.log | 9 ++- .../components/dataClass.results.txt | 2 + .../components/dataClassComponentByRef.log | 1 - .../components/dataClassInsideDataClass.log | 3 - .../components/extensionComponentFun.0.kt | 12 ++++ .../components/extensionComponentFun.log | 9 ++- .../extensionComponentFun.results.txt | 6 +- .../kotlin/conventions/components/for.log | 1 - .../kotlin/conventions/components/isAndAs.log | 1 - .../kotlin/conventions/components/lambdas.log | 1 - .../components/mayTypeAffectAncestors.log | 1 - .../components/memberComponentFun.log | 1 - .../conventions/components/operators.log | 1 - .../components/recursiveDataClass1.log | 1 - .../components/recursiveDataClass2.log | 2 - .../kotlin/conventions/components/when.log | 1 - ...kotlinComponentFunctionParameterUsages.log | 1 - 28 files changed, 96 insertions(+), 54 deletions(-) create mode 100644 idea/testData/findUsages/kotlin/conventions/components/dataClass.1.java create mode 100644 idea/testData/findUsages/kotlin/conventions/components/dataClass.2.java diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/search/usagesSearch/destructuringDeclarationUsages.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/search/usagesSearch/destructuringDeclarationUsages.kt index b4f9e504484..74c6f153e3b 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/search/usagesSearch/destructuringDeclarationUsages.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/search/usagesSearch/destructuringDeclarationUsages.kt @@ -21,7 +21,6 @@ import com.intellij.lang.java.JavaLanguage import com.intellij.openapi.application.ApplicationManager import com.intellij.psi.* import com.intellij.psi.search.* -import com.intellij.psi.search.searches.ClassInheritorsSearch import com.intellij.psi.search.searches.ReferencesSearch import com.intellij.util.Processor import org.jetbrains.kotlin.KtNodeTypes @@ -187,29 +186,7 @@ private class Processor( return } - val parameters = ClassInheritorsSearch.SearchParameters(psiClass, GlobalSearchScope.allScope(project), true, true, false) - val classesToSearch = listOf(psiClass) + ClassInheritorsSearch.search(parameters).findAll() - testLog?.add("Searched inheritors of ${psiClass.logPresentation()}") - - for (classToSearch in classesToSearch) { - testLog?.add("Searched references to ${classToSearch.logPresentation()}") - ReferencesSearch.search(classToSearch).forEach(Processor processor@ { reference -> //TODO: see KT-13607 - if (processDataClassUsage(reference)) return@processor true - - if (destructuringDeclarationUsageSearchMode != ALWAYS_SMART) { - plainSearchHandler(searchScope) - return@processor false - } - - val element = reference.element - val document = PsiDocumentManager.getInstance(project).getDocument(element.containingFile) - val lineAndCol = DiagnosticUtils.offsetToLineAndColumn(document, element.startOffset) - error("Unsupported reference: '${element.text}' in ${element.containingFile.name} line ${lineAndCol.line} column ${lineAndCol.column}") - }) - - // we must use plain search inside our data class (and inheritors) because implicit 'this' can happen anywhere - (classToSearch as? KtLightClass)?.kotlinOrigin?.let { usePlainSearch(it) } - } + addClassToProcess(psiClass) processTasks() @@ -230,6 +207,31 @@ private class Processor( } } + private fun addClassToProcess(classToSearch: PsiClass) { + data class ProcessClassUsagesTask(val classToSearch: PsiClass) : Task { + override fun perform() { + testLog?.add("Searched references to ${classToSearch.logPresentation()}") + ReferencesSearch.search(classToSearch).forEach(Processor processor@ { reference -> //TODO: see KT-13607 + if (processDataClassUsage(reference)) return@processor true + + if (destructuringDeclarationUsageSearchMode != ALWAYS_SMART) { + plainSearchHandler(searchScope) + return@processor false + } + + val element = reference.element + val document = PsiDocumentManager.getInstance(project).getDocument(element.containingFile) + val lineAndCol = DiagnosticUtils.offsetToLineAndColumn(document, element.startOffset) + error("Unsupported reference: '${element.text}' in ${element.containingFile.name} line ${lineAndCol.line} column ${lineAndCol.column}") + }) + + // we must use plain search inside our data class (and inheritors) because implicit 'this' can happen anywhere + (classToSearch as? KtLightClass)?.kotlinOrigin?.let { usePlainSearch(it) } + } + } + addTask(ProcessClassUsagesTask(classToSearch)) + } + private enum class CallableToProcessKind { HAS_DATA_CLASS_TYPE, PROCESS_LAMBDAS @@ -407,15 +409,20 @@ private class Processor( } is KtConstructorCalleeExpression -> { - if (typeRefParent.parent is KtSuperTypeCallEntry) { - // usage in super type list - just ignore, inheritors are processed above + val parent = typeRefParent.parent + if (parent is KtSuperTypeCallEntry) { + val classOrObject = (parent.parent as KtSuperTypeList).parent as KtClassOrObject + val psiClass = classOrObject.toLightClass() + psiClass?.let { addClassToProcess(it) } return true } } is KtSuperTypeListEntry -> { if (typeRef == typeRefParent.typeReference) { - // usage in super type list - just ignore, inheritors are processed above + val classOrObject = (typeRefParent.parent as KtSuperTypeList).parent as KtClassOrObject + val psiClass = classOrObject.toLightClass() + psiClass?.let { addClassToProcess(it) } return true } } @@ -492,6 +499,16 @@ private class Processor( } break@ParentsLoop } + + is PsiReferenceList -> { + if (parent.role == PsiReferenceList.Role.EXTENDS_LIST || parent.role == PsiReferenceList.Role.IMPLEMENTS_LIST) { + val psiClass = parent.parent as PsiClass + if (!psiClass.isPrivateOrLocal()) { + addClassToProcess(psiClass) + } + } + break@ParentsLoop + } } prev = parent diff --git a/idea/testData/findUsages/kotlin/conventions/components/SAM.log b/idea/testData/findUsages/kotlin/conventions/components/SAM.log index 6a7544d93b2..c948db9ee67 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/SAM.log +++ b/idea/testData/findUsages/kotlin/conventions/components/SAM.log @@ -1,5 +1,4 @@ Resolved java class to descriptor: JavaSAM -Searched inheritors of pack.A Searched references to JavaClass.takeSAM() in Kotlin files Searched references to JavaSAM in java files Searched references to pack.A diff --git a/idea/testData/findUsages/kotlin/conventions/components/callableReferences.log b/idea/testData/findUsages/kotlin/conventions/components/callableReferences.log index 5b642852376..b17f2f8c6f3 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/callableReferences.log +++ b/idea/testData/findUsages/kotlin/conventions/components/callableReferences.log @@ -6,7 +6,6 @@ Checked type of X.f2() Checked type of constructor Checked type of fun2 Checked type of fun3 -Searched inheritors of A Searched references to A Searched references to X.f2() in Kotlin files Searched references to constructor in Kotlin files diff --git a/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.log b/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.log index c5632abaab8..f24dc0317bf 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.log +++ b/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.log @@ -1,4 +1,3 @@ -Searched inheritors of A Searched references to A Used plain search in LocalSearchScope: CLASS:A diff --git a/idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType1.log b/idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType1.log index 7e402f2ddba..2962145f1b4 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType1.log +++ b/idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType1.log @@ -1,6 +1,5 @@ Checked type of (x, y) Checked type of f() -Searched inheritors of X Searched references to X Searched references to f() in Kotlin files Used plain search in LocalSearchScope: diff --git a/idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType2.log b/idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType2.log index f1b5f41801b..987e3756c02 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType2.log +++ b/idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType2.log @@ -1,7 +1,6 @@ Checked type of (x1, y1) Checked type of f() Checked type of g() -Searched inheritors of X Searched references to X Searched references to f() in Kotlin files Used plain search in LocalSearchScope: diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.java b/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.java index 85b9159d78b..e65e2b2a789 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.java +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.java @@ -1,5 +1,3 @@ -// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter -// OPTIONS: usages import pack.A; import java.util.Collections; diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt b/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt index 9acc50f6dad..c2cae241912 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt @@ -24,4 +24,4 @@ fun List.ext1() { val (x, y) = get(0) } -fun T.getThis(): T = this \ No newline at end of file +fun T.getThis(): T = this diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.1.java b/idea/testData/findUsages/kotlin/conventions/components/dataClass.1.java new file mode 100644 index 00000000000..3ecac1f0fd1 --- /dev/null +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.1.java @@ -0,0 +1,6 @@ +import pack.A; + +import java.util.List; + +public abstract class JavaClass2 implements List { +} diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.1.kt b/idea/testData/findUsages/kotlin/conventions/components/dataClass.1.kt index dbea985d1b9..6aa5aa1bbe4 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClass.1.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.1.kt @@ -20,3 +20,8 @@ fun g() = A() fun h() = g() fun listOfA() = listOf(A(1, "", "")) + +fun test2(p1: JavaClass2, p2: JavaClass3) { + val (x1, y1) = p1[0] + val (x2, y2) = p2[0] +} \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.2.java b/idea/testData/findUsages/kotlin/conventions/components/dataClass.2.java new file mode 100644 index 00000000000..491c0bb31f1 --- /dev/null +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.2.java @@ -0,0 +1,6 @@ +import pack.A; + +import java.util.ArrayList; + +public class JavaClass3 extends ArrayList { +} diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.log b/idea/testData/findUsages/kotlin/conventions/components/dataClass.log index 64d221f9239..b4c2d3989cf 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClass.log +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.log @@ -1,5 +1,7 @@ Checked type of (x, y, z) +Checked type of (x1, y1) Checked type of (x1, y1, z1) +Checked type of (x2, y2) Checked type of (x2, y2, z2) Checked type of (x3, y3, z3) Checked type of (x4, y4, z4) @@ -9,15 +11,20 @@ Checked type of g() Checked type of h() Checked type of listOfA() Checked type of listOfA() -Searched inheritors of pack.A Searched references to JavaClass.getA() in Kotlin files +Searched references to JavaClass2 +Searched references to JavaClass3 Searched references to a in Kotlin files Searched references to f() in Kotlin files Searched references to g() in Kotlin files Searched references to h() in Kotlin files Searched references to listOfA() in Kotlin files Searched references to pack.A +Searched references to pack.X +Searched references to parameter p1 in test2() in Kotlin files +Searched references to parameter p2 in test2() in Kotlin files Used plain search in LocalSearchScope: CLASS:A + CLASS:X FUN:ext1 FUN:ext1 \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.results.txt b/idea/testData/findUsages/kotlin/conventions/components/dataClass.results.txt index 3644499092e..87c2cbe1aed 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClass.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.results.txt @@ -5,6 +5,8 @@ [dataClass.1.kt] Value read 11 val (x3, y3, z3) = h() [dataClass.1.kt] Value read 13 val (x4, y4, z4) = listOfA()[0] [dataClass.1.kt] Value read 15 val (x5, y5, z5) = javaClass.getA()[0] +[dataClass.1.kt] Value read 25 val (x1, y1) = p1[0] +[dataClass.1.kt] Value read 26 val (x2, y2) = p2[0] [dataClass.1.kt] Value read 5 a.n [dataClass.1.kt] Value read 8 val (x, y, z) = a [dataClass.1.kt] Value read 9 val (x1, y1, z1) = f() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.log b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.log index c6108837d72..39e3962d34b 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.log +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.log @@ -1,6 +1,5 @@ Checked type of (x, y, z) Checked type of a -Searched inheritors of A Searched references to A Searched references to a in Kotlin files Used plain search in LocalSearchScope: diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.log b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.log index 23c85e6c727..4b0c045eab3 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.log +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.log @@ -2,9 +2,6 @@ Checked type of (a, n) Checked type of (a1, n1) Checked type of (x, y, z) Checked type of (x1, y1, z1) -Searched inheritors of A -Searched inheritors of B -Searched inheritors of C Searched references to A Searched references to B Searched references to C diff --git a/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.0.kt b/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.0.kt index 9e092d7e4b0..12fac660309 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.0.kt @@ -5,6 +5,13 @@ interface X class Y : X +open class G { + fun get(): T = TODO() +} + +abstract class Z1 : List +abstract class Z2 : G() + operator fun X.component1(): Int = 0 operator fun X.component2(): Int = 1 @@ -17,3 +24,8 @@ fun test() { fun Y.ext() { val (a, b) = this } + +fun g(z1: Z1, z2: Z2) { + val (x1, y1) = z1[0] + val (x2, y2) = z2.get() +} diff --git a/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.log b/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.log index df510c3b09b..5bfa96a760a 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.log +++ b/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.log @@ -1,12 +1,19 @@ Checked type of (x, y) +Checked type of (x1, y1) +Checked type of (x2, y2) Checked type of f() -Searched inheritors of X Searched references to X Searched references to Y +Searched references to Z1 +Searched references to Z2 Searched references to f() in Kotlin files +Searched references to parameter z1 in g() in Kotlin files +Searched references to parameter z2 in g() in Kotlin files Used plain search in LocalSearchScope: CLASS:X CLASS:Y + CLASS:Z1 + CLASS:Z2 FUN:component1 FUN:component2 FUN:ext \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.results.txt b/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.results.txt index 9975558d098..2e98da56765 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.results.txt @@ -1,2 +1,4 @@ -Value read 14 val (x, y) = f() -Value read 18 val (a, b) = this \ No newline at end of file +Value read 21 val (x, y) = f() +Value read 25 val (a, b) = this +Value read 29 val (x1, y1) = z1[0] +Value read 30 val (x2, y2) = z2.get() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/for.log b/idea/testData/findUsages/kotlin/conventions/components/for.log index 35f82297184..c22b03c7406 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/for.log +++ b/idea/testData/findUsages/kotlin/conventions/components/for.log @@ -1,7 +1,6 @@ Checked type of (x, y) Checked type of (x, y, z) Checked type of parameter a in FOR -Searched inheritors of A Searched references to A Searched references to parameter a in FOR in Kotlin files Used plain search in LocalSearchScope: diff --git a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.log b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.log index 6a6c4ef4771..bb96e95c20f 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.log +++ b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.log @@ -1,7 +1,6 @@ Checked type of (x, y) Checked type of (x1, y1) Checked type of list -Searched inheritors of A Searched references to A Searched references to list in Kotlin files Used plain search in LocalSearchScope: diff --git a/idea/testData/findUsages/kotlin/conventions/components/lambdas.log b/idea/testData/findUsages/kotlin/conventions/components/lambdas.log index 0bb980b1124..8ee03b73f3c 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/lambdas.log +++ b/idea/testData/findUsages/kotlin/conventions/components/lambdas.log @@ -1,4 +1,3 @@ -Searched inheritors of A Searched references to A Searched references to parameter p in foo() in Kotlin files Searched references to parameter p in takeExtFun() in Kotlin files diff --git a/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.log b/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.log index b4790860e69..5ddce136df8 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.log +++ b/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.log @@ -1,6 +1,5 @@ Checked type of (x1, y1) Checked type of y1() -Searched inheritors of A Searched references to A Searched references to parameter a in condition() in Kotlin files Searched references to parameter a in x() in Kotlin files diff --git a/idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.log b/idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.log index 3a1c80b6125..4cb0fa33863 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.log +++ b/idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.log @@ -4,7 +4,6 @@ Checked type of (x2, y2) Checked type of f() Checked type of g() Checked type of h() -Searched inheritors of X Searched references to X Searched references to Y Searched references to Z diff --git a/idea/testData/findUsages/kotlin/conventions/components/operators.log b/idea/testData/findUsages/kotlin/conventions/components/operators.log index 314d0cecc3a..01b0311ec64 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/operators.log +++ b/idea/testData/findUsages/kotlin/conventions/components/operators.log @@ -1,4 +1,3 @@ -Searched inheritors of A Searched references to A Used plain search in LocalSearchScope: CLASS:A diff --git a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.log b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.log index 901a8632f1c..2e8b8a08d11 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.log +++ b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.log @@ -1,7 +1,6 @@ Checked type of (a1, n1) Checked type of (a2, n2) Checked type of (a2, n2) -Searched inheritors of A Searched references to A Searched references to parameter a in A() in Kotlin files Searched references to parameter a in f() in Kotlin files diff --git a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.log b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.log index da05969f203..3c381d8ccab 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.log +++ b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.log @@ -1,7 +1,5 @@ Checked type of (a1, s) Checked type of (b, n) -Searched inheritors of A -Searched inheritors of B Searched references to A Searched references to B Searched references to a1 in Kotlin files diff --git a/idea/testData/findUsages/kotlin/conventions/components/when.log b/idea/testData/findUsages/kotlin/conventions/components/when.log index 3ee2e387705..0bc453b5b68 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/when.log +++ b/idea/testData/findUsages/kotlin/conventions/components/when.log @@ -1,4 +1,3 @@ -Searched inheritors of A Searched references to A Used plain search in LocalSearchScope: CLASS:A diff --git a/idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.log b/idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.log index ecc261cfe93..92211435338 100644 --- a/idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.log +++ b/idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.log @@ -1,4 +1,3 @@ -Searched inheritors of test.KotlinDataClass Searched references to test.KotlinDataClass Used plain search in LocalSearchScope: CLASS:KotlinDataClass