As of now, this implementation is not supposed to be used at all
If (for some reason) it becomes relevant again, please refer
to the 7fd441f1 commit which contained a FE10 implementation
of this service (copied from the old FE10 implementation of
import optimizer)
We don't plan to seriously support the FE10 implementation of
`KtImportsOptimizer` service, since it's not going to be used in IDE
(it has its own old version of import optimization logic)
`KtImportOptimizerResult.unusedImports` should be removed soon, and
part of the testdata for the import optimizer service should go
to `intellij` repository
- This is more consistent with "top-level callable names in package" and
simplifies the set construction quite a bit, as we can avoid a lot of
`asString` conversions.
- `LLFirProviderHelper` is guarded by `allowKotlinPackage` and the
symbol names provider should reflect that in the name sets.
- Note that this does not apply to stub-based deserialized symbol
providers, because they do not pass any value to `allowKotlinPackage`.
^KT-57314
In previous commit (K2: prefer derived class sources...)
we changed default source for callable copy (e.g. substitution override)
to its owner class. This can create an unexpected situation in LL API,
because normally KtCallableDeclaration is expected to be a source.
This commit introduces "compensation" on analysis API side.
A common platform builtin session before were created with `::wrapScopeWithJvmMapped`.
This required some other JVM session components to be registered.
We cannot register all JVM components in builtin session;
it would lead to problems like KT-62777.
So we use `::wrapScopeWithJvmMapped` only for true JVM sessions.
This commit fixes a test added in the previous commit for KT-62768.
^KT-62768 fixed
Added test `FirSourceLazyDeclarationResolveTestGenerated.Classes.testClassDelegatedInCommonCode`
now fails with another exception (KT-62772). It's fixed in the following commit.
^KT-62768 fixed
There was a case when we visited the same declaration multiple times
because of forward-referencing and visiting with designation
So because of this there were two changes required:
- remove assertion about visiting the same declaration twice (it's fine
since we don't actually resolve annotations twice)
- not skipping resolution of class children if annotations on this class
are already resolved
^KT-61388 Fixed
KT-62854
Implicit receivers generally do not affect the resolution of types.
However, they generate scopes which might contain undesirable
classifiers, which can confuse reference shortener.
Dropping all the implicit receivers when dealing with type references
allows completely avoid such undesirable scopes instead of filtering
them by `instanceof` checks.
Also, temporary move `hasTypeParameterFromParent` check higher to the
`findClassifierElementsToShorten`, because ATM we don't know how to
properly decide whether to shorten the fully-qualified inner types
with implicit parameters or not (see KTIJ-26072).
^KTIJ-26057 Fixed
- This adds KDoc reference resolution tests for callables in nested and
inner classes, overloaded functions, and private callables.
- Private declarations are visible in KDoc from outside their containing
classes. This is in line with K1 KDoc behavior.
^KTIJ-22324
- We should use member scopes to find symbols from supertypes.
- The issue was already fixed for static callables because the declared
member scope was composed with the static member scope. See
KTIJ-25960.
^KTIJ-26003 fixed
`FirSafeCallExpression` does not implement `FirResolvable`, so we need
to unwrap it to correctly resolve calls like `foo?.bar()` when `bar` is
a lambda with receiver parameter or a functional type property
^KTIJ-27434 Fixed
This is the cause for the 'missing dependency supertype: Serializable'
issue: symbols from built-ins will have the additional Serializable
supertype provided by FirJvmDeserializationExtension that shouldn't
be used for non-JVM. In regular modules it is correctly not added by
the non-JVM sessions, leading to difference in supertypes and the error.
KTIJ-27449
This commit also fixes a missing symbol for KtScriptInitializer
and some symbol pointers
Many tests marked as 'DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE'
due to KtFirFileSymbol#createPointer logic – the pointer can
be created only for PSI
^KT-61451
^KT-61887
^KT-62626 Fixed
^KT-62693