Kirill Rakhman
69a7bf7f68
[FIR] Add equality constraint from expected type for some synthetic function calls
...
This fixes some cases where we infer some type variable inside one
of the branches to Nothing instead of the expected type because Nothing
appeared in some other branch.
Specifically, we add an equality instead of a subtype constraint during
completion of calls to synthetic functions for if/when, try and !!.
We don't do it when the call contains a (possibly nested) elvis or is
inside the RHS of an assignment.
Otherwise, we would prevent some smart-casts.
#KT-65882 Fixed
2024-03-05 17:38:59 +00:00
Nikolay Lunyak
7541732752
[FIR] Fix TEST SPEC tests
...
Ensure the test data contents for both the frontends
are identical. This is needed for proper analysis of
K2-differences.
2023-06-19 07:40:15 +00:00
Denis.Zharkov
d7399ed1cf
K2: Avoid losing diagnostics for synthetic calls
...
Some of the changed tests may duplicate other existing diagnostics,
but that should not be reason not to report them at all.
There might be another job to be done to avoid diagnostic duplications
2023-02-15 08:13:41 +00:00
Victor Petukhov
42e71f8c53
Remove explicit enabling the new type inference from test data
2022-07-22 16:03:52 +00:00
Ilya Kirillov
a8a31231f7
Get rid of duplicated file names in spec tests
...
Otherwise, corresponding IDE tests would fail on creation duplicated
files in the same directory
2021-06-04 13:16:17 +02:00
Victor Petukhov
bd7fb56a24
Fix builder inference tests
2021-05-28 15:36:23 +03:00
anastasiia.spaseeva
bef59055cd
[Spec tests] Fix test cases structure
2020-07-28 20:26:31 +03:00
Mikhail Zarechenskiy
100a6f70ca
Relax rules about inferring to Nothing for special calls
...
#KT-37388 Fixed
#KT-38427 Fixed
#KT-39953 Fixed
#KT-38899 Fixed
2020-07-16 09:56:46 +03:00
anastasiia.spaseeva
9d862aaa1d
[Spec tests] Remove spec info from fir tests
2020-05-26 17:27:06 +03:00
Victor Petukhov
379c6944a2
NI: extract diagnostics from partially resolved call instead of separately handling it including running all checks
...
^KT-37630 Fixed
^KT-35494 Fixed
2020-05-22 22:13:53 +03:00
anastasiia.spaseeva
d32aca87d1
[Spec tests] Change metadata structure of implementation and spec tests
2020-05-22 02:51:57 +03:00
Denis Zharkov
3bb6aa6f28
Mark as FIR_IDENTICAL passing spec tests
2020-04-21 10:16:42 +03:00
Denis Zharkov
ee75347bb0
FIR: Adjust testData for spec tests: expressions
2020-04-21 09:52:52 +03:00
anastasiia.spaseeva
509036b08b
[Spec tests] Update spec tests metadata
2020-03-30 11:15:53 +03:00
anastasiia.spaseeva
8b307c0a2a
[Spec tests] KT-35494 test update
2020-03-30 11:15:53 +03:00
anastasiia.spaseeva
e865327386
[Spec tests] Add tests for try-expression (paragraphs 1, 2, 5-9)
2020-01-09 17:16:10 +03:00