Quick search of equals operator usages
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Used plain search of kotlin.Any.equals(other: kotlin.Any?) in whole search scope
|
||||
@@ -0,0 +1,18 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIND_BY_REF
|
||||
|
||||
class A(val n: Int) {
|
||||
fun foo(a: A) = a <caret>== this
|
||||
|
||||
override override fun equals(other: Any?): Boolean = TODO()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
1 == 2
|
||||
A(0) == A(1)
|
||||
A(0) != A(1)
|
||||
A(0) equals A(1)
|
||||
A(0) === A(1)
|
||||
A(0) !== A(1)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
Checked type of A.foo(a: A)
|
||||
Resolved A(0) != A(1)
|
||||
Resolved A(0) == A(1)
|
||||
Resolved a == this
|
||||
Searched references to A
|
||||
Searched references to parameter a of A.foo(a: A) in non-Java files
|
||||
Used plain search of A.equals(other: Any?) in LocalSearchScope:
|
||||
CLASS:A
|
||||
@@ -0,0 +1,4 @@
|
||||
Function call 13 A(0) == A(1)
|
||||
Function call 14 A(0) != A(1)
|
||||
Function call 15 A(0) equals A(1)
|
||||
Function call 6 fun foo(a: A) = a == this
|
||||
Reference in New Issue
Block a user