Denis.Zharkov
a33d9df0cd
NI: Support forking inference with heuristics
...
Mostly, it only affects FIR
It partially allows to consider several variance of constraints like
A<Int> & A<T> <: A<X_var> that are mostly brought by smart casts
^KT-49542 Fixed
^KT-50489 Relates
2022-01-11 20:45:55 +03:00
Denis.Zharkov
1d258635a2
NI: Get rid of confusing asConstraintSystemCompletionContext
...
NB: there is a different asConstraintSystemCompleterContext that might have side effects
2022-01-11 20:45:53 +03:00
Irene Dea
13bff10567
Fix union related failures.
2022-01-08 15:26:44 +03:00
Irene Dea
a98e2c4e03
Fix failed tests
2022-01-08 15:26:44 +03:00
Irene Dea
19bfc43bee
Fixes and refactors
2022-01-08 15:25:07 +03:00
Irene Dea
56d817b49f
Union type attributes for common super type calculation
2022-01-08 15:25:07 +03:00
Simon Ogorodnik
8b23d86bd9
Treat mixed (subtyping, inference) sub-types properly in CST
2021-12-15 22:23:18 +03:00
Victor Petukhov
b3943f5ab6
[FE 1.0] Process builder inference stub types with different nullability properly
...
^KT-49887 Fixed
2021-12-15 22:23:18 +03:00
Simon Ogorodnik
8cf97127fe
Add util for safe registration of type variables in constraint system
2021-12-15 22:23:16 +03:00
Simon Ogorodnik
5efbd016bd
Inference: Respect stub-type nullability in common super-type
2021-12-15 22:23:00 +03:00
Simon Ogorodnik
7b8ece8758
FIR: Make constraint injector treat stub types as type variables
2021-12-15 22:22:55 +03:00
Simon Ogorodnik
6cf2c6f93a
Select non-DeclaredUpperBound for initial when simplifying constraint
2021-12-15 22:22:52 +03:00
Simon Ogorodnik
91b629d16a
Refactor. Remove ConstraintPosition data duplication
2021-12-15 22:22:52 +03:00
Tianyu Geng
a5844b754e
Type Approximation: add separate flag to control approx. anonymous type
...
This extra flexibility is useful for IDE where we always want to
approximate anonymous types but may not want to approximate other local
types
2021-12-15 16:09:27 +03:00
Anastasia.Shadrina
343a860553
[FE] Make OverloadChecker take CR into account
2021-12-14 15:19:42 +03:00
Victor Petukhov
ce2c6f5d1f
[FE 1.0] Don't mark type variable as READY_FOR_FIXATION_DECLARED_UPPER_BOUND_WITH_SELF_TYPES if it has complex dependency to other type variables
...
^KT-49838 Fixed
2021-12-07 11:41:13 +03:00
Anastasiya Shadrina
a091b345a0
[FE] Provide overloadability for candidates with different CR
2021-12-02 20:24:19 +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
37495bcba0
[FE] Change resolution scheme
2021-12-02 20:23:57 +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
3fb17cfa9a
Minor. Reformat PostponedArgumentInputTypesResolver.kt
2021-11-26 19:39:50 +03:00
Denis.Zharkov
61fe70b600
Minor. Rename isAnonymousFunction to isFunctionExpression
2021-11-26 19:39:50 +03:00
Denis.Zharkov
dba04bcf80
Fix extraction of type for start projected type
...
Some existing tests start failing after previous commits
2021-11-26 19:39:48 +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
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
43e9c1223a
Take into account possible passed old captured type in isCapturedTypeFromSubtyping check
...
^KT-48590 Fixed
2021-10-26 19:37:55 +03:00
Tianyu Geng
826ea122a9
FIR checker: DSL_SCOPE_VIOLATION
2021-10-05 15:30:37 +03:00
Mark Punzalan
41a1fa25e2
FIR: Add ConeVisibilityError to distinguish between candidates that are
...
invisible versus hidden due to deprecation.
2021-09-29 19:39:15 +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
Tianyu Geng
05fbed68e2
FIR checker: report PROPERTY_AS_OPERATOR
2021-09-10 07:07:43 +03:00
Denis.Zharkov
d91155558b
Rename LF: DefinitelyNotNullTypeParameters -> DefinitelyNonNullableTypes
2021-08-31 15:41:17 +03:00
Dmitriy Novozhilov
7e6e0a3dd6
Remove all type system-specific inheritors of TypeCheckerState
2021-08-26 10:08:51 +03:00
Dmitriy Novozhilov
3f6738c8bc
Remove all type system dependent methods from 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
Ivan Kochurkin
34cc7e5199
[FIR] Fix resolving to star import member instead of builtin (^KT-48157 Fixed)
2021-08-25 21:53:23 +00:00
Ivan Kochurkin
bb27ae2b42
[FIR] Fix incorrect resolve of callable reference in function signature (^KT-48304 Fixed)
2021-08-25 21:53:23 +00:00
Matthew Gharrity
e27b75bfba
Check for cancelation during type inference
...
This should slightly mitigate the UI freezes caused by KT-47545.
2021-08-20 16:49:42 +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
261a04b587
Rename "coroutine( inference) *" stuff into "builder inference *"
2021-08-20 01:28:05 +03:00
Ivan Kochurkin
301f446433
Restore KtModifierKeywordToken instead of String in modifier diagnostics
...
Remove KeywordType
2021-08-18 00:45:57 +03:00
Ivan Kochurkin
e85940a1ac
Unbind modifiers checks from psi
...
Use common code in FE and FIR in modifier checker, refactor
2021-08-13 18:32:26 +03:00
Tianyu Geng
cd99c35649
FIR: instantiate type argument to captured type if needed
2021-08-09 14:38:30 +03:00
Tianyu Geng
bcf6582af7
FIR checker: make TypeApproximatorConfiguration.capturedType consistent with others
2021-08-09 14:38:30 +03:00
Victor Petukhov
93f9d9dacd
Check if the intersecting types aren't empty during finding the result type for variable fixation
...
^KT-47941 Fixed
2021-08-04 17:36:50 +03:00
Dmitriy Novozhilov
c3060e861f
[FIR] Add expect actual checker
2021-07-20 10:33:49 +03:00
Dmitriy Novozhilov
6e83820f97
Move ExpectActualCompatibility to :compiler:resolution.common
2021-07-20 10:33:33 +03:00
Victor Petukhov
6a1ec92d39
Introduce specific error for calls which could be resolved only with unrestricted builder inference
...
^KT-47747 Fixed
2021-07-16 19:32:36 +03:00
Victor Petukhov
967304ffca
Don't compute default type for a fixing type variable for self type if the corresponding feature is disabled
2021-07-09 19:21:27 +03:00
Victor Petukhov
c2cf2f36cd
Implement inferring materialized self types through a default type in ResultTypeResolver
2021-07-09 19:21:04 +03:00