this@ClassName supported
This commit is contained in:
+6
@@ -257,6 +257,12 @@ private class Processor(
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is KtContainerNode -> {
|
||||||
|
if (parent.node.elementType == KtNodeTypes.LABEL_QUALIFIER) {
|
||||||
|
return true // this@ClassName - it will be handled anyway because members and extensions are processed with plain search
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (element.getStrictParentOfType<KtImportDirective>() != null) return true // ignore usage in import
|
if (element.getStrictParentOfType<KtImportDirective>() != null) return true // ignore usage in import
|
||||||
|
|||||||
@@ -2,7 +2,13 @@
|
|||||||
// OPTIONS: usages
|
// OPTIONS: usages
|
||||||
package pack
|
package pack
|
||||||
|
|
||||||
data class A(val <caret>n: Int, val s: String, val o: Any)
|
data class A(val <caret>n: Int, val s: String, val o: Any) {
|
||||||
|
fun f() {
|
||||||
|
"a".apply {
|
||||||
|
this@A.toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun A.ext1() {
|
fun A.ext1() {
|
||||||
val (x, y) = getThis()
|
val (x, y) = getThis()
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
[dataClass.0.kt] Value read 16 val (x, y) = get(0)
|
[dataClass.0.kt] Value read 14 val (x, y) = getThis()
|
||||||
[dataClass.0.kt] Value read 8 val (x, y) = getThis()
|
[dataClass.0.kt] Value read 22 val (x, y) = get(0)
|
||||||
[dataClass.1.kt] Value read 4 for ((x, y, z) in arrayOf<A>()) {
|
[dataClass.1.kt] Value read 4 for ((x, y, z) in arrayOf<A>()) {
|
||||||
[dataClass.1.kt] Value read 8 val (x, y) = a
|
[dataClass.1.kt] Value read 8 val (x, y) = a
|
||||||
[dataClass.2.kt] Function call 6 a.component1()
|
[dataClass.2.kt] Function call 6 a.component1()
|
||||||
|
|||||||
Reference in New Issue
Block a user