Implement search from expect element in KotlinReferenceSearcher
So mostly #KT-17512 Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
fun test() {
|
||||
My("a").boo()
|
||||
My("b").boo()
|
||||
}
|
||||
|
||||
expect class My(val s: String) {
|
||||
fun boo()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, expected
|
||||
|
||||
actual class <caret>My(val s: String) {
|
||||
actual fun boo() {}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
[common.kt] New instance creation 2 My("a").boo()
|
||||
[common.kt] New instance creation 3 My("b").boo()
|
||||
@@ -1,4 +1,4 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// OPTIONS: usages, expected
|
||||
|
||||
actual fun <caret>boo(s: String) {}
|
||||
@@ -0,0 +1,2 @@
|
||||
[common.kt] Function call 2 boo("a")
|
||||
[common.kt] Function call 3 boo("b")
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fun test() {
|
||||
use(boo)
|
||||
use(boo)
|
||||
}
|
||||
|
||||
fun use(arg: Int) {}
|
||||
|
||||
expect val boo: Int
|
||||
@@ -0,0 +1,4 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages, expected
|
||||
|
||||
actual val <caret>boo: Int get() = 42
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
[common.kt] Value read 2 use(boo)
|
||||
[common.kt] Value read 3 use(boo)
|
||||
Reference in New Issue
Block a user