While it's a good practice to remove all files that were downloaded
during the test execution, here we delete files in common directory
without checking that files were not present before test start.
This might be dangerous as we might fail other tests and programs.
As we manipulate common maven directory it's better to leave downloaded
files untouched
It seems the original function type gets lost during resolution. Hence
thie change added a custom attribute to recover the original function
type on an anonymous function
1. Inner class constructor should have its outer class as a dispatch
receiver, since it is necessary for the call. Before it was null
2. Substituted inner class constructor should have its original dispatch
receiver type with the proper substitution. Before it was set to the
class itself (since the class was usually passed as a new dispatch
receiver)
Also, modify FIR renderer, so it properly renders the dispatch receiver
of the constructors
Check if visibility is public API first, then check if declaration is
annotated with `@PublishedApi`. This is needed because loading
annotations and iterating over them can be slow.
Do not compute IdSignature for descriptor a second time when adding a
new symbol. Instead, pass the calculated signature to the lambda in
declare/declareIfNotExists/referenced, and use it in `reference*`
methods.
Extract duplicated code, remove unused methods and unneeded OptIn.
Also, check original for descriptors only in case the symbol is not
computed yet. Checking it on every access is not needed.
Collecting all outer classes into a hash set and looking up classifiers
in that set for each type of each fake override is noticeably slow.
Instead, check that function types reference any type parameter whose
container is a class; if the function is not local, it means such type
parameter belongs to one of the outer classes.
#KT-42020
It's not that simple because we still need inline functions bodies
and classes fields which aren't present in Lazy IR. To overcome this,
save additional binary info for a cached library and then use it when needed
parameters.
This was causing exceptions with analysis API trying to resolve the
synthetic FirValueParameter because it could not find a KtDeclaration
for it. Using BODY_RESOLVE should be safe; the SAM constructor function
is also on BODY_RESOLVE and the type of the value parameter is known.
When storing mapping from moduleName to module information, ensure
that values from kotlinOptions DSL objects are taken into
consideration.
Fixes #KT-49066
Test: KotlinAndroid70GradleIT.testCustomModuleName