There was a problem, that after founding of new annotation with meta
annotation we did not come back to previous files, which may contain
declarations with this new annotation
- Get rid of SPECIAL mode (just left REGULAR and class-related instead)
- Clear naming
- Restore contexts after lambda/callable reference are processed
The test has been failing before this change because after
callable reference is resolved, its tower data context has been left
erroneously in the SPECIAL-related entry
If we want to analyse some function's call, we need to know about its
contracts, otherwise resolving the following code would be broken.
Computing return type of function is a prerequisite to using it in any
sensible way, so it's the best place to resolve it to CONTRACTS
KT-50733
If the `candidateSymbol` is an extension, then it cannot be called with
an explicit dispatch receiver, because only the extension receiver
can be explicit in such case
Therefore, we consider `receiverExpression` to be a dispatch
receiver only if the `candidateSymbol` is not an extension
KTIJ-21910
`init` is not a callable declaration, and is considered local, so you
cannot build a designation starting from it. In that we case we traverse
parents until we find the first non-local class, and use it as a
container
KTIJ-21910
This commit fixes a failing visibility check
(FirSymbolByPsiTestGenerated.testBackingField) for the backing field.
Merge-request: KT-MR-6389
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
Using `ownerLookupTag` might be wrong in case of private constuctors
of inner classes: their owner is an Inner class, but expected
dispach receiver is Outer
- use-site should be contained within the class that owns callee symbol
- class-representative of dispatch receiver value
should be exactly the same as a container class of a callee (not its subtype)
It leads to further infer type variable into those upper bounds which is forbidden
Substituted upper bounds is ok because specific substituted types came from constraints of other proper positions, or if specific substituted type is from declared upper bound too, then there should be another declared upper bound with no substitution
^KT-51464 Fixed
^KT-47986 Fixed