Dmitriy Novozhilov
7f692be11e
[FIR] Properly detect callable reference type according conversions
2020-09-11 12:13:33 +03:00
Victor Petukhov
bcd33da6f8
Don't check an argument type during passing it to vararg in the named form to avoid false positives if the argument type is type variable yet
...
^KT-41144 Fixed
2020-09-10 19:38:26 +03:00
Victor Petukhov
685d16ec68
NI: don't do substitution for unsupported callable descriptors to use as callable references
...
^KT-41729 Fixed
2020-09-09 18:00:41 +03:00
Dmitriy Novozhilov
cd557ad178
Change order of enum entries in CandidateApplicability
2020-09-09 12:38:34 +03:00
Dmitriy Novozhilov
d1568c1ce6
Rename ResolutionCandidateApplicability to CandidateApplicability
2020-09-09 12:38:33 +03:00
Pavel Kirpichenkov
f8ee976720
Use union of all available descriptors in composite importing scope
2020-09-07 18:52:10 +03:00
Pavel Kirpichenkov
5892bdf3f4
Extend import resolution for library-to-source analysis
...
Use composite importing scope for references when resolution anchors are enabled.
Composite scope provides additional descriptors from scope of resolution anchor module.
Overriding old importing scope with a new one is not possible as it breaks library
dependencies on other libraries, which are inaccessible in anchor scope (scope for sources).
KT-24309 In Progress
2020-09-07 18:52:10 +03:00
Dmitriy Novozhilov
d1fd1da56f
Rename Visibility to DescriptorVisibility
2020-09-04 11:07:42 +03:00
Mikhail Zarechenskiy
9c217e3d99
Reuse revised variables during lambda analysis against type variables
...
#KT-41400 Fixed
2020-09-01 13:04:53 +03:00
Dmitriy Novozhilov
07c353973d
Move requireOrDescribe to :core:compiler.common
2020-09-01 12:00:11 +03:00
Dmitriy Novozhilov
f010dc533c
Move Variance.convertVariance to :core:compiler.common
2020-09-01 12:00:11 +03:00
Pavel Kirpichenkov
2979c37001
[NI] Fix resolution status for UnstableSmartCastDiagnostic
...
RESOLVED_WITH_ERROR was initially added for reproducing OI behavior.
The intention was to preserve resolution into unstable smart cast and to keep failing candidate.
However, this idea was abandoned after OI behavior proved inconsistent in cases involving generics.
This commit restores RUNTIME_ERROR status of UnstableSmartCastDiagnostic.
^KT-41357 Fixed
2020-09-01 11:21:13 +03:00
Pavel Kirpichenkov
873224dfbc
[NI] Use new type substitutor for known type parameters
...
Use known type parameters substitutor after substitutor for fresh variables.
The old logic of substituions had the following order:
- replace known type parameters
- replace type parameters with type variables
- complete inference
- replace type variables with inferred types
According to the updated logic, replacement goes as follows:
- replace type parameters with type variables
- replace known type parameters; if they were variables, this will effectively remove them from inference
- complete inference
- replace remaining type variables with inferred types
Support projection substitution in new type substitutor.
It is needed for correct interaction with old type substitutor.
Old type substitutors can contain mappings constructor -> projection
which couldn't be expressed correctly with existing substitutor API in some cases.
^KT-41386 Fixed
2020-08-31 17:53:46 +03:00
Dmitriy Novozhilov
148e8fe76e
Move FlatSignature to :compiler:resolution.common
2020-08-28 10:59:53 +03:00
Dmitriy Novozhilov
64766e125c
Move common inference classes to :compiler:resolution.common
2020-08-28 10:59:53 +03:00
Dmitriy Novozhilov
068d21635e
[NI] Get rid of KotlinType usages in MutableConstraintStorage.kt
2020-08-28 10:59:52 +03:00
Dmitriy Novozhilov
af0df35623
[NI] Get rid of FE 1.0 types in ConstraintInjector
2020-08-28 10:59:52 +03:00
Dmitriy Novozhilov
ad039a28bd
[NI] Get rid of left FE 1.0 types in NewConstraintSystemImpl
2020-08-28 10:59:52 +03:00
Dmitriy Novozhilov
6914aba5c2
[NI] Commonize detection of @OnlyInputTypes in NewConstraintSystemImpl
2020-08-28 10:59:52 +03:00
Dmitriy Novozhilov
64f0ee21c1
Get rid of FE 1.0 classes usage in ConstraintIncorporator
2020-08-28 10:59:52 +03:00
Dmitriy Novozhilov
1050f7f066
Extract PostponedResolvedAtomMarker to separate file
2020-08-28 10:59:52 +03:00
Dmitriy Novozhilov
1cadabb099
Extract ResolutionCandidateApplicability to separate file
2020-08-28 10:59:52 +03:00
Dmitriy Novozhilov
775df6dfc3
[NI] Get rid of FE 1.0 type usages in ResultTypeResolver
2020-08-28 10:59:52 +03:00
Dmitriy Novozhilov
aae1681b76
[NI] Get rid of ResolvedAtom usage in ConstraintSystemCompletionContext
2020-08-28 10:59:51 +03:00
Dmitriy Novozhilov
11e8552861
[NI] Get rid of PostponedArgumentInputTypesResolver.Context
2020-08-28 10:59:51 +03:00
Dmitriy Novozhilov
970a2581a1
[NI] Extract PostponedArgumentsAnalyzerContext from PostponedArgumentsAnalyzer
2020-08-28 10:59:51 +03:00
Dmitriy Novozhilov
b15f847943
[NI] Extract common parts from KotlinConstraintSystemCompleter
2020-08-28 10:59:51 +03:00
Dmitriy Novozhilov
12fbb93871
[NI] Extract FE 1.0 specific part from NewCommonSuperTypeCalculator
2020-08-28 10:59:51 +03:00
Dmitriy Novozhilov
b21a0213df
[NI] Get rid of FE 1.0 types in AbstractTypeApproximator
2020-08-28 10:59:51 +03:00
Dmitriy Novozhilov
527c5a771d
[NI] Get rid of FE 1.0 types in AbstractTypeCheckerContextForConstraintSystem
2020-08-28 10:59:51 +03:00
Dmitriy Novozhilov
686c17a234
[NI] Rename NewConstraintSystem.diagnostics to errors
2020-08-28 10:59:50 +03:00
Dmitriy Novozhilov
59b2cb6393
[NI] Split KotlinCallDiagnostics and inference errors to different hierarchies
2020-08-28 10:59:50 +03:00
Dmitriy Novozhilov
fae21d4db3
Introduce frontend independent constraint positions
2020-08-28 10:59:50 +03:00
Dmitriy Novozhilov
e5e3d7cab1
Extract FE 1.0 related parts from NewConstraintSystem
2020-08-28 10:59:50 +03:00
Dmitry Savvinov
5649cbc2e1
Wire KotlinTypeRefiner in areCallableDescriptorsEquivalent
...
See the issue for details
^KT-41218 Fixed
2020-08-27 18:50:42 +03:00
Dmitriy Novozhilov
9cde42e2bc
[NI] Fix shouldRunCompletion for builder inference session
...
#KT-41308 Fixed
#KT-41363
2020-08-27 16:51:12 +03:00
Dmitriy Novozhilov
e98cbf81cf
[NI] Don't always complete builder inference lambda in FULL mode
...
#KT-41164 Fixed
2020-08-27 16:51:11 +03:00
Mikhail Zarechenskiy
cba13c3c35
Take into account captured types with variables during fixation
...
#KT-41202 Fixed
2020-08-27 11:06:14 +03:00
Mikhail Zarechenskiy
06a592c018
Fix SOE when recursive type argument is used with star projection
...
#KT-41043 Fixed
2020-08-26 19:23:21 +03:00
Mikhail Zarechenskiy
674e9e455f
Fold lower constraints like (T!!..T) and (T..T?) into the latter one
...
#KT-41149 Fixed
2020-08-26 19:23:20 +03:00
Mikhail Zarechenskiy
e91b378b7d
Don't perform unnecessary SAM conversions
...
#KT-41149 In Progress
2020-08-26 19:23:19 +03:00
Mikhail Zarechenskiy
6a7ed96be5
Consider T <: Nothing! as trivial during constraint incorporation
...
#KT-41149 In Progress
2020-08-26 19:23:18 +03:00
Mikhail Zarechenskiy
567e6ca9ca
Fix OOM when there are several lambdas with extension function types
...
#KT-41335 Fixed
2020-08-26 19:23:18 +03:00
Alexander Udalov
a9ddf02556
Replace deprecated usages of max/min with maxOrNull/minOrNull
2020-08-25 20:33:59 +02:00
Dmitriy Novozhilov
a764732020
Rename KotlinBuiltInsNames to StandardNames
2020-08-25 10:41:33 +03:00
Dmitriy Novozhilov
079a2dfe1e
Move EventOccurrencesRange class to :core:descriptors.common module
2020-08-25 10:31:37 +03:00
Dmitriy Novozhilov
7a7fe77b8e
Move static constants with builtin names to :core:descriptors.common module
2020-08-25 10:31:36 +03:00
Denis Zharkov
cee72023fa
Remove TypeSystemContext::mayBeTypeVariable optimization
...
It doesn't work now since anyway it's required to obtain type
constructor
At the same time, now it's not very expensive to obtain the constructor
since it's just a lookup tag
2020-08-21 12:50:33 +03:00
Alexander Udalov
a21f273570
Fix compiler warnings in compiler code
2020-08-17 21:18:20 +02:00
Mikhail Zarechenskiy
aafe41cf7a
Do not force coercion to Unit for nullable lambda return type
...
#KT-41005 Fixed
2020-08-13 10:40:51 +03:00