Nikolay Lunyak
be9e97d044
[FIR] Introduce ConeDynamicType
2022-06-02 13:47:23 +00:00
Victor Petukhov
b472ccd358
[FE 1.0] Introduce deprecation of inferred type variable into a declared upper bound within a builder inference call
2022-05-31 14:13:29 +00:00
Victor Petukhov
848075192c
[FE 1.0] Don't use BuilderInferenceSubstitutionConstraintPosition for declared upper bound constraint with no substituted upper bound
...
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
2022-05-31 14:13:28 +00:00
Ivan Kochurkin
feb3f41108
[FIR] Fix resolve inside lambda
...
The lambda is passed to extension function with type parameters
that defined inside this lambda
^KT-52197
^KT-52190 Fixed
2022-05-29 23:41:25 +03:00
Victor Petukhov
867ad24c86
[FE] Show causing types in the INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION diagnostic
2022-05-27 15:14:24 +00:00
Victor Petukhov
6a34b184ac
[FE] Introduce warnings on possible empty intersection types, and improve errors reporting in general
...
^KT-52361 Fixed
2022-05-27 15:14:23 +00:00
Victor Petukhov
02a430875f
[FE 1.0] Don't fail candidates which were marked with compatibility resolve previously
...
^KT-52431 Fixed
^KT-52393 Fixed
2022-05-27 15:14:22 +00:00
Victor Petukhov
efa267bf86
[FE] Fix tests after rebase
2022-05-27 13:56:34 +00:00
Victor Petukhov
51551998c7
Revert "[FE 1.0] Take care callable reference candidates with recursive candidate return type"
...
This reverts commit d04beaa8bb49c99ceb993f3f7b32169c393b39f4.
2022-05-27 13:56:33 +00:00
Victor Petukhov
06deaed3d5
Add test for KT-50498
2022-05-27 13:56:33 +00:00
Victor Petukhov
c25e07119c
[FE 1.0] Skip improper constraints while determining READY_FOR_FIXATION_DECLARED_UPPER_BOUND_WITH_SELF_TYPES type variable readiness
...
^KT-51148 Fixed
2022-05-27 13:56:32 +00:00
Denis.Zharkov
9f7876efb6
FIR: Avoid potentially dangerous checks at makesSenseToBeDefinitelyNotNull
...
Sometimes, it might be called before type parameter bounds are initialized
or even before the symbols are bound to FIR
In such cases, we just assume it makes sense to create DNN there
2022-05-19 16:54:06 +00:00
Denis.Zharkov
f70ae2df3a
FIR: Refine inference constraints when type variable in flexible position
...
That issue might be fixed via changing
TypeVariableMarker.shouldBeFlexible at ConeConstraintSystemUtilContext
but this and some other tricks have been added because of incorrect
handling of constraints where type variable has a flexible bound
^KT-51168 Fixed
2022-05-19 16:53:59 +00:00
Ivan Kylchik
51ccc32a3f
Update test data after introducing IntrinsicConstEvaluation annotation
2022-05-18 21:19:57 +03:00
Xin Wang
eb1d7110ec
FE: Fix null assertion error when left is CollectionLiteral
...
#KT-49961 fixed
2022-05-18 08:57:16 +02:00
Victor Petukhov
11eb5ce39c
[FE] Check types in canHaveCommonSubtype for intersection emptiness with erasing nullability
...
It doesn't affect having common subtypes check but may lead to false positives
^KT-52364 Fixed
2022-05-12 15:11:27 +00:00
Victor Petukhov
9f31f074da
[FE 1.0] Take care callable reference candidates with recursive candidate return type
...
^KT-51844 Fixed
2022-05-09 19:23:43 +00:00
Victor Petukhov
7675361380
[FE 1.0] Continue completion of calls inside that builder inference call postponed type variables of which has already been inferred
2022-05-09 12:38:39 +00:00
Victor Petukhov
6c54b78574
[FE 1.0] Don't capture projections during compatibility check of supertypes to determine intersection type emptiness
2022-04-27 19:50:30 +00:00
Victor Petukhov
73be9d0a20
[FE] Don't check intersection emptiness if there were lower constraints
2022-04-27 19:50:30 +00:00
Victor Petukhov
20a8e5d742
[FE] Determine intersection type emptiness by looking at supertypes properly: substitute their type arguments
2022-04-27 19:50:29 +00:00
Victor Petukhov
54f0794ce3
[FE] Substitute erased type parameters as covariant
2022-04-27 19:50:28 +00:00
Victor Petukhov
fb76d819f0
[FE] Erase type parameters of super types during intersection type emptiness check as well
2022-04-27 19:50:27 +00:00
Victor Petukhov
0f1d212fc5
[FE] Fix tests
2022-04-27 19:50:27 +00:00
Victor Petukhov
12a39d0330
[FE 1.0] Report errors due to inferred empty intersection on those candidates which were already previously discriminated by CompatibilityOfTypeVariableAsIntersectionTypePart
2022-04-27 19:50:26 +00:00
Victor Petukhov
38913b68b2
[FE] Add additional test for marking with warnings a call resolve of which is going to be changed
2022-04-27 19:50:26 +00:00
Victor Petukhov
39d13442be
[FE] Support intersection type emptiness checking for interfaces
2022-04-27 19:50:25 +00:00
Victor Petukhov
1da52ab197
[FE] Add test for KT-51016
2022-04-27 19:50:25 +00:00
Victor Petukhov
b32887380a
[FE] Move empty intersection tests into separate directory
2022-04-27 19:50:24 +00:00
Victor Petukhov
e0a1f1c405
[FE] Review fixes
2022-04-27 19:50:24 +00:00
Victor Petukhov
c71ae4301c
[FE 1.0] Get rid of absolute CompatibilityOfTypeVariableAsIntersectionTypePart
2022-04-27 19:50:24 +00:00
Victor Petukhov
47d6236a2d
[FIR] Support determining emptiness of an intersection type with type parameters' types
2022-04-27 19:50:23 +00:00
Victor Petukhov
5bfe6cd20a
[FE] Implement discussed rules to report empty intersection errors
2022-04-27 19:50:22 +00:00
Victor Petukhov
b96708c3e2
[FE] Support reporting INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION for empty intersection types with type parameters
2022-04-27 19:50:21 +00:00
Victor Petukhov
c16ae81a48
[FIR] Report errors for upper bounded type variables by an empty intersection type
...
^KT-51221 Fixed
2022-04-27 19:50:21 +00:00
Victor Petukhov
65213e9a42
[FE 1.0] Report warnings or errors for upper bounded type variables by an empty intersection type
2022-04-27 19:50:21 +00:00
Ivan Kochurkin
05bed8f751
[FIR] Hide local type for return type of single expression function ^KT-51418 Fixed
2022-04-18 15:36:18 +00:00
Ivan Kochurkin
81b1ed9ad4
[FIR] Fix false positive RETURN_TYPE_MISMATCH in intellij ultimate
2022-04-07 21:03:08 +03:00
Ivan Kochurkin
c6f52893fb
[FIR] Fix inconsistent RETURN_TYPE_MISMATCH and TYPE_MISMATCH reporting on functions and properties
...
^KT-51203 Fixed
2022-04-05 15:50:43 +00:00
Victor Petukhov
27fa632630
[FE 1.0] Update test data with new error type representation
2022-03-23 21:13:33 +00:00
Simon Ogorodnik
9f6a812786
Fix multiple registration of same type variable in builder inference
2022-03-18 12:14:00 +00:00
Mikhail Glukhikh
53d6ac24e5
Switch kotlin version to 1.7
...
* Change 1.6 to 1.7 constants
* Fix SAFE_CALL_WILL_CHANGE_NULLABILITY for testData
* Change EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING to EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR
* Change NON_EXHAUSTIVE_WHEN_STATEMENT to NO_ELSE_IN_WHEN
* Fix testData for SafeCallsAreAlwaysNullable
* Change T -> T & Any in test dumps
* Change INVALID_CHARACTERS_NATIVE_WARNING -> INVALID_CHARACTERS_NATIVE_ERROR
* TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING -> TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR
2022-02-25 11:46:27 +00:00
Vladimir Dolzhenko
918a91dbdf
Escape special names with backticks in test data
...
#KT-51248
2022-02-10 21:20:47 +00:00
Ivan Kochurkin
30871fc08f
[FIR] Infer labeled type for lambda in return in catch ^KT-51009 Fixed
2022-02-07 17:22:01 +03:00
Victor Petukhov
1a23cd8c45
[FE 1.0] Don't try to report specialized resolution ambiguity error for builder inference if the corresponding substitutor is empty
...
^KT-50989 Fixed
2022-01-27 15:30:16 +03:00
Mikhail Glukhikh
e8be9d4861
FIR: support don't use builder inference if possible
...
In this commit we upgrade FIR builder inference logic from
the compiler version to 1.7. FIR-based compiler now works with
"don't use builder inference" flag always ON and supports switching
the flag "use builder inference only if needed". To do it,
ContraintSystemCompleter (FIR) and KotlinConstraintSystemCompleter (FE 1.0)
are made similar with extracting some common parts into
ConstraintSystemCompletionContext.
Test status: one BB test fails after this commit (KT-49285).
Also we have a crush in DFA logic in FIR bootstrap test and somehow
questionable behavior in FIR diagnostic test. However,
two BB tests were fixed, the 3rd case from KT-49925 were also fixed.
#KT-49925 Fixed
2022-01-20 23:46:36 +03:00
Dmitriy Novozhilov
cd578e9d13
[FIR] Fix inference in presence of Unit expected type
2022-01-20 11:25:47 +03:00
Dmitriy Novozhilov
5fc1e2e0cb
[FIR] Don't create DNN types for flexible simple types
...
^KT-50788
2022-01-18 13:41:31 +03:00
Victor Petukhov
72a78eb423
Replace errors with warnings for type checker recursion on delegates
...
^KT-49477 Fixed
2022-01-17 21:27:14 +03:00
Victor Petukhov
a4a2f71fca
Introduce deprecation cycle for reporting errors on some illegal equality calls inside a builder inference call
...
^KT-43493 Fixed
2022-01-17 19:44:16 +03:00