Callable references handled
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
|
||||
data class A(val <caret>a: Int, val b: Int) {
|
||||
fun f() {}
|
||||
}
|
||||
|
||||
fun f1(): A = A(1, 2)
|
||||
|
||||
class X {
|
||||
fun f2() = A(0, 0)
|
||||
}
|
||||
|
||||
fun foo(x: X) {
|
||||
val fun1 = A::f
|
||||
|
||||
val fun2 = ::f1
|
||||
val fun3 = x::f2
|
||||
val (a1, b1) = fun2()
|
||||
val (a2, b2) = fun3()
|
||||
|
||||
val constructor = ::A
|
||||
val (a3, b3) = constructor(1, 2)
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
Checked type of (a1, b1)
|
||||
Checked type of (a2, b2)
|
||||
Checked type of (a3, b3)
|
||||
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
|
||||
Searched references to f1() in Kotlin files
|
||||
Searched references to fun2 in Kotlin files
|
||||
Searched references to fun3 in Kotlin files
|
||||
Used plain search in LocalSearchScope:
|
||||
CLASS:A
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Value read 19 val (a1, b1) = fun2()
|
||||
Value read 20 val (a2, b2) = fun3()
|
||||
Value read 23 val (a3, b3) = constructor(1, 2)
|
||||
Reference in New Issue
Block a user