Visibility checks currently do not work in some cases, for example:
- public nested class of private class is seen globally
- private_for_this does not work
- some other cases I am not yet aware of
If `FirVisibilityChecker.isVisible` fix those issues, they will be fixed
automatically in the completion
Local declarations do not have a stable `ClassId`, which is used in
`declarationUtils.collectDesignation`. Local classes will always have
`outerClassId.isLocal = true`, even when it is not true (see
`org.jetbrains.kotlin.fir.builder.Context.currentClassId` for why this
happens)
Property consists of getter and setter (both optional). The setter
have a single `value` parameter with type
Because of it, we have to make a separate 'frankenstein setter' with
original resolved header, but with the body of the fake one
It seems that getters does not have such issues
In such expressions, `KtCallExpression` wraps `KtSimpleNameExpression`,
so `getQualifiedExpressionForSelector()` returns `null`
Also, enable tests that are fixed by this
Generic candidate extensions are completed in partial mode
when there is not enough information for type parameter in return position.
Partial completion mode in single candidate resolver leads to unconditionally failing candidate.
Providing noExpectedType instead of null guarantees full completion.
- Found few problems during resolving a single functon; disabled
assertions and marked them with TODO
- Add simple completion tests to simplify development
- This should not affect the performance of the completion, since all
object extensions are collected on the last step, when all main variants
are already collected
- Add more tests
- Also, disable completion of extensions from objects as callable
references (^KT-37395 Fixed)
- ^KT-36860 Fixed
- When named parameter is on its own position, the completion of the next argument will not be limited by named arguments only
- The completion will not suggest already used arguments names
- ^KT-35258 Fixed
- Exclusion happens only when `ReleaseCoroutines` feature is supported
- Add `LANGUAGE_VERSION` to few tests to make sure that previous exclusions still work when `experimental` package is not excluded entirely
- ^KT-34582 Fixed
- The issue was caused by incorrect parsing of enum entry because of `$` in the `KotlinCompletionContributor::DEFAULT_DUMMY_IDENTIFIER`
- Incorrect parsing caused arguments next to completed one to be recognized as another enum entries
- Change `KotlinCompletionContributor::isInClassHeader` to accept classes without bodies, so identifier without `$` is used inside enum entries constructors
- ^KT-31762 Fixed
- Add extensions only when completion of static members is enabled (double ctrl + space and nonempty prefix)
- Add full import for callables with receiver in `LookupElement.decorateAsStaticMember`
- `ImportedFromObjectCallableDescriptor` and descriptors in general do
not have consistent `equals`, which leads to duplication in completion
when multiple functions from objects are imported, or when function is
visible in some scope both implicitly and by import (see KT33903_1.kt)
- ^KT-33903 Fixed