KotlinAnnotatedElementsSearcher optimization
When possible, try to resolve references in types using only the PSI without building the full resolve session.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package foo
|
||||
|
||||
annotation class Xyzzy
|
||||
|
||||
object Foo {
|
||||
class Xyzzy
|
||||
}
|
||||
|
||||
@Xyzzy fun foo()
|
||||
|
||||
// ANNOTATION: foo.Xyzzy
|
||||
// SEARCH: method:foo
|
||||
// OPTIMIZED_TRUE: 1
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package foo
|
||||
|
||||
annotation class Test
|
||||
|
||||
object Foo {
|
||||
private annotation class Test
|
||||
}
|
||||
|
||||
@Test fun foo()
|
||||
|
||||
// ANNOTATION: foo.Test
|
||||
// SEARCH: method:foo
|
||||
// OPTIMIZED_TRUE: 1
|
||||
@@ -0,0 +1,5 @@
|
||||
@Suppress fun shazam(): Nothing = TODO()
|
||||
|
||||
// ANNOTATION: kotlin.Suppress
|
||||
// SEARCH: method:shazam
|
||||
// OPTIMIZED_TRUE: 1
|
||||
@@ -0,0 +1,16 @@
|
||||
package foo.bar
|
||||
|
||||
class A
|
||||
|
||||
object F {
|
||||
class foo {
|
||||
class bar {
|
||||
annotation class A
|
||||
|
||||
@foo.bar.A fun test(): Nothing = TODO()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ANNOTATION: foo.bar.F.foo.bar.A
|
||||
// SEARCH: method:test
|
||||
@@ -0,0 +1,12 @@
|
||||
package foo
|
||||
|
||||
class A {
|
||||
private annotation class B
|
||||
|
||||
class C {
|
||||
@B
|
||||
fun foo() {}
|
||||
}
|
||||
}
|
||||
// ANNOTATION: foo.A.B
|
||||
// SEARCH: method:foo
|
||||
@@ -0,0 +1,6 @@
|
||||
typealias Suppress = kotlin.Suppress
|
||||
|
||||
@Suppress fun shazam(): Nothing = TODO()
|
||||
|
||||
// ANNOTATION: kotlin.Suppress
|
||||
// SEARCH: method:shazam
|
||||
Reference in New Issue
Block a user