Anastasiya Shadrina
f92ac6ca14
[FE] TowerResolver optimizations
2021-12-02 20:24:12 +03:00
Anastasiya Shadrina
e3f987459c
[PSI, FE] Support functional types
2021-12-02 20:24:11 +03:00
Anastasiya Shadrina
e53cee77a3
[FE] Support multiple candidates for extension receiver
2021-12-02 20:24:10 +03:00
Anastasiya Shadrina
af78ec7371
[PSI, FE] Review fixes
2021-12-02 20:24:04 +03:00
Anastasiya Shadrina
f427265739
[FE] Resolve overload conflict between contextual and non-contextual declarations
2021-12-02 20:24:03 +03:00
Anastasiya Shadrina
814777ba8c
[FE] Report ambiguity in all possible cases
2021-12-02 20:23:58 +03:00
Anastasiya Shadrina
37495bcba0
[FE] Change resolution scheme
2021-12-02 20:23:57 +03:00
Anastasiya Shadrina
1f6746dc74
[FE] Relax the "no subtyping between context receivers" limitation
2021-12-02 20:23:56 +03:00
Anastasiya Shadrina
bfd20e1890
[FE] Move context receivers checks to the separate resolution part
2021-12-02 20:23:56 +03:00
Anastasiya Shadrina
c34fe8d547
[FE] Implement temporary resolution algorithm
2021-12-02 20:23:24 +03:00
Anastasiya Shadrina
d923c95671
[FE] Add context receivers to scope
2021-12-02 20:23:22 +03:00
Anastasiya Shadrina
a39fbd3822
[FE] Add getContextReceivers to CallableDescriptor interface
2021-12-02 20:23:17 +03:00
Denis.Zharkov
0d9ad62d4a
Fix inference for lambdas with with extension function expected type
...
^KT-49832 Fixed
^KT-49836 Fixed
2021-11-26 19:39:51 +03:00
Denis.Zharkov
61fe70b600
Minor. Rename isAnonymousFunction to isFunctionExpression
2021-11-26 19:39:50 +03:00
Victor Petukhov
a6fd14d4e6
[FE 1.0] Eliminate resolution ambiguity on inherited SAM-interfaces
...
^KT-17765 Fixed
2021-11-22 14:18:30 +03:00
Victor Petukhov
a5c6d370dd
[FE 1.0] Eliminate resolution ambiguity with external type parameters
...
^KT-10926 Fixed
2021-11-22 14:18:29 +03:00
Victor Petukhov
42805db989
[FE 1.0] Take into account import aliases during hidden member resolution
2021-11-22 10:43:43 +03:00
Dmitriy Novozhilov
93378b1a04
[FE 1.0] Resolve private constructors of sealed classes same as for regular classes
...
^KT-44866
^KT-49729
2021-11-18 13:54:05 +03:00
Victor Petukhov
b69fb6779f
Basic support of partially specified type arguments though a new underscore operator for type arguments
...
^KT-13394
2021-11-01 12:25:07 +03:00
Victor Petukhov
64c682f465
Remove constraints containing stub types after completion of the common system of a builder inference call
...
^KT-49285 Fixed
2021-10-26 19:37:59 +03:00
Victor Petukhov
e0a4704c21
Revert "Make freshly substituted type variables def not nullable if they come from not null type parameter"
...
This reverts commit 41936a790b37bef45d7e7dad851856ea1750ef01.
2021-10-26 19:37:58 +03:00
Victor Petukhov
836c6b280d
Make freshly substituted type variables def not nullable if they come from not null type parameter
...
^KT-48778 Fixed
2021-10-26 19:37:57 +03:00
Victor Petukhov
02d06b6390
Transform VisibilityError diagnostic for callable references to further report it on the corresponding argument of a base call
...
^KT-46437 Fixed
2021-10-26 19:37:57 +03:00
Victor Petukhov
e34b2d1850
Have common KotlinCallArgument for CompatibilityWarningOnArgument
2021-10-26 19:37:56 +03:00
Irene Dea
78ee6b2a09
Extend CandidateInterceptor to intercept ResolvedCallAtom candidate
2021-10-14 18:32:03 +03:00
Victor Petukhov
abd2507107
Don't discriminate generics during callable references resolution
...
^KT-49038 Fixed
2021-10-01 22:09:33 +03:00
Victor Petukhov
43a83dd07a
Don't add LHS type constraint for callable references too early, before the resolution
...
The constraint depends on a resolution candidate, because it can be Java static or companion object's member (don't need add constraint in this case)
^KT-41978 Fixed
2021-10-01 13:33:21 +03:00
Alexander Udalov
dbd28142d0
Fix callable reference adaptation for vararg in fake override
...
`mappedVarargElements` are populated with parameters from
`argumentMapping`, which is computed using `ArgumentsToParametersMapper`
which calls `original` on all value parameters (see
ArgumentsToParametersMapper.kt:136).
So the code that adds empty lists for unassigned vararg parameters
should also call `original`. Otherwise, in the added test, we ended up
with two arguments for the parameter `s` in `id(::base1)`, one for
`Base.s` containing the correct value, and another for `Derived.s`
containing the empty list. Psi2ir took the last one, which resulted in
empty array being passed to the vararg parameter.
Note that all of this is caused by the fact that `original` of a fake
override parameter is the parameter of the base function. This seems
suspicious because `original` of a fake override _function_ is that fake
override itself (NOT the base function), but this would probably be very
risky to change at this point.
#KT-48835 Fixed
2021-09-30 14:08:38 +02:00
Denis.Zharkov
4733a0d970
Refine naming: *TypeVariable -> *TypeParameter
2021-09-30 14:36:27 +03:00
Victor Petukhov
ee728b6902
Use the new type inference for top-level callable reference resolution
...
^KT-47797 Fixed
^KT-47987 Fixed
^KT-45034 Fixed
^KT-48446 Fixed
^KT-13934 Fixed
2021-09-27 16:12:27 +03:00
Victor Petukhov
ca13aea26a
Creating resolved and resolution atoms for callable references
2021-09-27 16:12:25 +03:00
Victor Petukhov
764361bc42
Format and remove unused imports and variables
2021-09-27 16:12:22 +03:00
Victor Petukhov
8b85b4630b
Write LHS resolution result into a call position
2021-09-27 16:12:20 +03:00
Victor Petukhov
f1803b49fe
Extract KotlinCallKind into separate file
2021-09-27 16:12:09 +03:00
Victor Petukhov
4559558001
Extract SimpleCandidateFactory into separate file
2021-09-27 16:12:08 +03:00
Victor Petukhov
7b9ef0be12
Introduce ResolutionCandidate by commonization KotlinResolutionCandidate and CallableReferenceCandidate
...
Also introduced SimpleErrorResolutionCandidate
2021-09-27 16:12:06 +03:00
Victor Petukhov
08060aa036
Extract CallableReferencesCandidateFactory into separate file
2021-09-27 16:12:05 +03:00
Victor Petukhov
4fcb16b4c4
Extract CallableReferenceCandidate into separate file
2021-09-27 16:12:04 +03:00
Victor Petukhov
dedac63a8c
Extract KotlinResolutionCandidate into separate file
2021-09-27 16:12:03 +03:00
Vyacheslav Gerasimov
ab146bd6d4
Build: Fix deprecated Gradle configurations usages
...
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Dmitry Savvinov
699eb47834
Never suggest fake overrides as results of expects-matching
...
See KT-48291 for example.
The rationale behind the change is that in "findExpectForActual" we want
to find a candidate to be a counterpart for the current (actual)
declaration. Fake overrides can not be a sensible counterpart in that
regard (you can't, nor you should, provide actual for expect which is
FAKE_OVERRIDE)
^KT-48291 Fixed
2021-09-08 16:22:54 +03:00
Dmitry Savvinov
d6cb96aa24
Wire proper KotlinTypeRefiner into ClassicTypeSystemCotextForCS
...
^KT-48589 Fixed
2021-09-06 12:06:26 +03:00
Denis.Zharkov
019001ca20
Optimize memory footprint related to empty/single element collections
...
^KT-47926 Related
2021-08-30 16:51:55 +03:00
Dmitriy Novozhilov
7e6e0a3dd6
Remove all type system-specific inheritors of TypeCheckerState
2021-08-26 10:08:51 +03:00
Dmitriy Novozhilov
e07512a847
Delegate refineType and prepareType in TypeCheckerState to special services
...
This is needed to add ability to create type system independent TypeCheckerState
2021-08-26 10:08:51 +03:00
Dmitriy Novozhilov
8b5548df49
Rename AbstractTypeCheckerContext to TypeCheckerState
2021-08-26 10:08:51 +03:00
Victor Petukhov
a1519b7b4e
Be able to infer a type variable based on several builder inference lambdas
...
^KT-48329 Fixed
2021-08-20 01:28:12 +03:00
Victor Petukhov
bf1e68a53f
Resolve calls using the builder inference despite the presence of the annotation if there are uninferred type variables
...
^KT-48194 Fixed
2021-08-20 01:28:11 +03:00
Victor Petukhov
55811c8851
Don't use builder inference if possible
...
The builder inference is running only if there are still uninferred type variables
^KT-48193 Fixed
2021-08-20 01:28:10 +03:00
Victor Petukhov
3df5667a4b
Split variables fixation and reporting "not enough type infromation" in the type system completer into two parts
2021-08-20 01:28:06 +03:00