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
efa267bf86
[FE] Fix tests after rebase
2022-05-27 13:56:34 +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
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
39d13442be
[FE] Support intersection type emptiness checking for interfaces
2022-04-27 19:50:25 +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
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
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
5fc1e2e0cb
[FIR] Don't create DNN types for flexible simple types
...
^KT-50788
2022-01-18 13:41:31 +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
Victor Petukhov
060af85a93
Extract checks on equality expressions into a separate checker
...
^KT-43493 Fixed
2022-01-17 19:44:16 +03:00
Dmitriy Novozhilov
57346bac54
[FIR] Properly handle flexible types during creation of DNNT
...
^KT-50788 Fixed
2022-01-17 17:59:22 +03:00
Victor Petukhov
455b3143e7
[FE 1.0] Introduce builder inference stub types checker which may report more precise and clear errors due to resolution ambiguity
...
^KT-49828 Fixed
2022-01-11 18:34:47 +03:00
Victor Petukhov
8e2b90b5db
[FE 1.0] Don't report CAST_NEVER_SUCCEEDS on stub types
...
^KT-49829 Fixed
2022-01-11 18:34:41 +03:00
Ivan Kylchik
c7435ba760
Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
...
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Dmitriy Novozhilov
f26059a7d3
[FE] Add clear warning about future changes about nullability of safe call with non nullable receiver
...
^KT-46860
2021-10-27 16:28:37 +03:00
Abduqodiri Qurbonzoda
a3755a8e94
@UseExperimental -> @OptIn in compiler testData
2021-10-17 21:14:37 +00:00
Svyatoslav Kuzmich
c88cde2f8b
[Wasm] DONT_TARGET_WASM_BACKEND => IGNORE_BACKEND in testdata
2021-10-02 06:14:35 +00: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
Mikhail Glukhikh
3febabe977
Use OPT_IN instead of EXPERIMENTAL in diagnostic names
2021-09-10 16:29:13 +03:00
Dmitriy Novozhilov
0924216ed2
[FIR] Distinguish stub types for builder inference and for subtyping
...
^KT-48110 Fixed
2021-08-26 10:08:52 +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
Tianyu Geng
4726dcce40
FIR DFA: smartcast variable to Nothing? on null assignment
...
In order to make resolution still work for members not available from
`Nothing`, we track the type without `Nothing?` and use that for
resolution instead.
2021-08-06 22:57:15 +03:00
Tianyu Geng
0026560bd7
FIR: substitute the whole lambda body after builder inference
2021-08-06 22:57:13 +03:00
Victor Petukhov
13cb3c138a
Update FE tests
2021-08-04 17:36:53 +03:00
Victor Petukhov
cf3bd016be
Always complete calls not related to the builder inference
...
^KT-47830 Fixed
2021-08-04 17:36:52 +03:00
Dmitriy Novozhilov
d17f984edf
[FE 1.0] Migrate most of warning/error pairs to DiagnosticFactoryForDeprecation
2021-08-03 00:17:33 +03:00
Victor Petukhov
95492f7370
[FE 1.0] Fix some diagnostic tests
2021-07-29 19:45:55 +02:00
Mikhail Glukhikh
82f268d611
FIR: add EXPERIMENTAL_API_USAGE reporting
2021-07-23 23:58:55 +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
357fda2efa
Initialize builder inference lambda anyway, even a call is inapplicable
...
^KT-47744 Fixed
2021-07-16 19:32:35 +03:00
Denis.Zharkov
0aca3a3737
FIR: Adjust test data after introduction of INFERENCE_NO_INFORMATION_FOR_PARAMETER
...
See previous commits for details
2021-06-07 15:25:47 +03:00
Victor Petukhov
2d3ed4b7da
Update FIR test data
2021-06-04 13:25:10 +03:00
Victor Petukhov
1e5998e0ba
Add constraints between two different stub variables instead of creating constraint error due to T1 isn't subtype of T2
...
^KT-44241 Fixed
2021-06-03 19:18:09 +03:00
Victor Petukhov
19c07e048a
Don't check suitability of a builder inference call if unrestricted builder inference is enabled
...
^KT-42139 Fixed
2021-06-03 17:28:40 +03:00
Victor Petukhov
67d48d0150
Fix failing test
2021-05-28 21:38:27 +03:00
Victor Petukhov
54b9f39b3a
Update tests after rebase
2021-05-28 15:36:24 +03:00
Victor Petukhov
bd7fb56a24
Fix builder inference tests
2021-05-28 15:36:23 +03:00
Victor Petukhov
4a767c597e
Don't report the same diagnsotics several times
2021-05-28 15:36:23 +03:00
Victor Petukhov
e942052eb6
Substitute stub type variables in local variable descriptors
2021-05-28 15:36:22 +03:00
Victor Petukhov
758eb8f851
Fix builder inference tests
2021-05-28 15:36:22 +03:00
Victor Petukhov
fd5169186e
Update test for the builder inference and add new ones
2021-05-28 15:36:21 +03:00
Victor Petukhov
0c427555cf
Support definitely not null stub types and proper subtyping on them
2021-05-28 15:36:19 +03:00
Victor Petukhov
0f317b01b4
Rename language feature StableBuilderInference to UnrestrictedBuilderInference
2021-05-28 15:36:19 +03:00