[Analysis API] Collect designations only for autonomous declarations

Parameters, type parameters, and property accessors are not
self-sufficient declarations (their resolution depends on resolution
of their parent), so a proper designation path cannot be computed
for them.

Without a designation path, 'ContextCollector' performs analysis of the
whole file, which is inefficient.
This commit is contained in:
Yan Zhulanow
2023-12-20 00:39:05 +09:00
committed by Space Team
parent 4a2f11b2f5
commit bed73fd650
20 changed files with 282 additions and 53 deletions
@@ -1,5 +1,5 @@
class Foo(
val a: String = "foo"
val b: Int = <expr>a.length</expr>,
val c: Long = (a.length - 1).toLong()
a: String = "foo",
b: Int = <expr>a.length</expr>,
c: Long = (a.length - 1).toLong()
)