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
Victor Petukhov
0b37b2be6a
Add addtional tests for builder inference
2021-05-28 15:36:19 +03:00
Victor Petukhov
703a353d2e
Determine empty constraint system for a builder inference call by presense of not fixed type variables
2021-05-28 15:36:17 +03:00
Victor Petukhov
c5faf532f5
Allow builder inference calls with labeled lambda
...
^KT-24993 Fixed
2021-05-28 15:36:16 +03:00
Victor Petukhov
90066d7e50
Add expected type constraints in a builder inference call
2021-05-28 15:36:16 +03:00
Victor Petukhov
ac7b459f2a
Do subtyping with stub types properly
...
1) Return stub type if we are calculating super type between two same stub types
2) Return nullable Any if those stub types are different
2021-05-28 15:36:15 +03:00
Victor Petukhov
26b8e86fe1
Render stub types properly
2021-05-28 15:36:14 +03:00
Denis.Zharkov
da3233c47d
FIR: Update test data (NEW_INFERENCE_ERROR)
...
Though these diagnostics look correct (the calls or constraint
systems indeed contain errors), more precise diagnostic kinds should be
chosen later.
2021-05-20 17:24:36 +03:00
Denis.Zharkov
00821bbc63
FIR: Update test data (repeated diagnostics)
...
They are a bit redundant, but it needs additional work to be done
to avoid them
2021-05-20 17:24:33 +03:00
Ivan Kochurkin
ad9b962536
[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)
2021-04-12 23:49:55 +03:00
Jinseong Jeon
2ecb6733ed
FIR checker: warn unnecessary non-null assertions
2021-04-09 12:32:45 +03:00
Tianyu Geng
761a0a7d0d
FIR checkers: report specific errors instead of INAPPLICABLE_CANDIDATE
...
Specifically, the report the following 4 errors.
* NON_VARARG_SPREAD
* ARGUMENT_PASSED_TWICE
* TOO_MANY_ARGUMENTS
* NO_VALUE_FOR_PARAMETER
Also added/updated the following position strategies.
* NAME_OF_NAMED_ARGUMENT
* VALUE_ARGUMENTS
2021-04-02 14:36:14 +03:00
Victor Petukhov
cc1cb463b2
Remove NonStrictOnlyInputTypesChecks LF and introduce opposite – StrictOnlyInputTypesChecks, set default as strict
2021-03-29 16:17:30 +03:00
Victor Petukhov
0dde5ddd7e
Fail calls constraints of which contain uninferred type parameter
...
^KT-44055 Fixed
It's possible only if there is a callable reference among subcalls which go though the old type inference (and the error for uninferred type parameter wasn't reported)
2020-12-25 11:53:16 +03:00
Victor Petukhov
4c56962678
Report errors on callable references which contains postponed type variables in the receiver type
2020-12-25 11:53:15 +03:00
Victor Petukhov
86edc5ca3a
Reuse information from already recorder descriptor for some callable references and don't rewrite at slice
2020-12-25 11:53:15 +03:00
Victor Petukhov
0b472f858b
Don't create DONT_CARE type for CR and lambdas within builder inference calls
...
It leads to leak such type to the back-end. Calls within a builder call should be updated without marking CR and lambdas with DONT_CARE type.
^KT-43845 Fixed
^KT-43956 Fixed
^KT-42622 Fixed
2020-12-25 11:53:14 +03:00
Victor Petukhov
b4d8adeeb4
Don't clean type info for containment operator if the resolution was unsuccessful, but all diagnostics were about only input types and non-strict only input types check was enabled
2020-12-25 11:53:09 +03:00
Victor Petukhov
954c9cecca
Compute type for callable references and lambdas inside not null assertion if couldn't get already recorded type
2020-12-25 11:52:59 +03:00
Victor Petukhov
39e579db91
Move tests for builder inference into the corresponding directory
2020-12-25 11:25:39 +03:00