Optimize isReferenceTo() when searching for PsiMethod usages
Avoid resolving references when we know from context that a reference at given location can't resolve to a PsiMethod.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// PSI_ELEMENT: com.intellij.psi.PsiMethod
|
||||
// OPTIONS: usages
|
||||
public class UnaryNot {
|
||||
public UnaryNot <caret>not() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fun unaryClient() {
|
||||
val u1 = UnaryNot()
|
||||
val u2 = !u1
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
Checked type of u1
|
||||
Checked type of u2
|
||||
Resolved !u1
|
||||
Searched references to UnaryNot
|
||||
Searched references to UnaryNot.not() in non-Java files
|
||||
Searched references to u1 in non-Java files
|
||||
Searched references to u2 in non-Java files
|
||||
@@ -0,0 +1 @@
|
||||
Function call 3 val u2 = !u1
|
||||
Reference in New Issue
Block a user