If we have the following classes
class A // Kotlin
class B extends A {} // Java
class C : B() // Kotlin
The analysis runs into infinite recursion, because C needs all members of B (to compute overrides),
and B needs all members of A, and A is not available from KotlinCacheManager.getDeclarationsFromProject() -- it is being computed right now,
so the analysis runs again...
Our workaround is:
* when analysis starts put its trace into user data on the project
* when a light class is about to generate a stub, it requests a trace, and if there is such an incomplete trace, it is returned
* the logic of TopDownAnalyzer that works in descending order (down the class hierarchy) guarantees that all the superclasses are already processed