Denis.Zharkov
d932d5b0a5
FIR: Support adding expect type to calls in foo() as R position
...
See https://kotlinlang.org/docs/whatsnew12.html#support-for-foo-as-a-shorthand-for-this-foo
2021-06-07 15:25:51 +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
Denis.Zharkov
c420957eac
FIR: Report INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic
2021-06-07 15:25:45 +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
Ivan Kochurkin
f081a6b4fa
[FIR] Implement REDUNDANT_PROJECTION diagnostics, rename FirConflictingProjectionChecker -> FirProjectionRelationChecker, fix tests
2021-06-03 18:24:34 +03:00
Ivan Kochurkin
b85846c0c0
[FIR] Fix location for CONFLICTING_PROJECTION diagnostics, extend conflictingProjection.kt with test sample
2021-06-03 18:24:29 +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
Dmitriy Novozhilov
0497f60af3
Revert "FIR DFA: store stability in RealVariable"
...
This reverts commit 62f7e8f7
2021-06-03 09:53:57 +03:00
Tianyu Geng
62f7e8f71f
FIR DFA: store stability in RealVariable
...
As part of this change, we also extend the usage of RealVariable in more
places during DFA. Now mutable properties, property with custom getters,
delegated properties, etc are also treatd as a `RealVariable`. In
general this is needed in order to carry out smartcast computation in
order to report `SMARTCAST_IMPOSSIBLE`. It seems to also have side
effects that improves behavior of some test files.
2021-06-02 13:19:12 +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
dac9d7b17a
FIR: Mark a pack of tests (53) as FIR_IDENTICAL
2021-05-25 13:28:29 +03:00
Denis.Zharkov
ddbdfafa79
Remove OI/NI attributes from test data
2021-05-25 13:28:27 +03:00
Denis.Zharkov
2ecba6ac39
Remove WITH_NEW_INFERENCE directive from all tests
...
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00
Denis.Zharkov
d4586cefb4
FIR: Properly deserialize upper bounds of classes type parameters
...
^KT-46661 Fixed
2021-05-25 13:28:25 +03:00
Denis.Zharkov
a801eccf66
FIR: Report ARGUMENT_TYPE_MISMATCH instead of TYPE_MISMATCH for arguments
2021-05-20 17:24:51 +03:00
Denis.Zharkov
7c05c6420a
FIR: Update test data (incorrect NEW_INFERENCE_ERROR with self types)
...
^KT-46661 Relates
2021-05-20 17:24:48 +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
7c5c744e87
FIR: Update test data (suspicious diagnostic on return statement)
...
There should be errors, but different: cannot infer parameter type
^KT-46422 Relates
2021-05-20 17:24:34 +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
Denis.Zharkov
b94335dd1c
FIR: Update diagnostics test data
...
Green code correctly became red
2021-05-20 17:24:30 +03:00
Denis.Zharkov
a700fdc312
FIR: Report diagnostics introduced during call completion
2021-05-20 17:24:10 +03:00
Igor Yakovlev
ae63ad0b6d
[FIR] Fix annotations invalid references diagnostics
2021-05-14 23:05:44 +03:00
Ivan Kochurkin
598501aaf0
[FIR] Improve locations for DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED, DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL, DEPRECATED_SINCE_KOTLIN_OUTSIDE_KOTLIN_SUBPACKAGE and other diagnostics, refactor
2021-05-12 18:42:44 +03:00
Mikhail Glukhikh
c284eab2dd
FIR / FE 1.0: fix exception for lambda with unresolved name
...
#KT-46515 Fixed
2021-05-11 15:41:06 +03:00
Jinseong Jeon
e2dc21da90
FIR checker: warn useless as and is
2021-05-05 18:20:51 +03:00
Ilya Kirillov
09a94f3200
FIR IDE: ignore non-passing tests in compiler based tests
2021-05-04 08:19:49 +02:00
Victor Petukhov
c9568c0744
Fix FIR tests
2021-04-30 16:49:56 +03:00
Victor Petukhov
7c62e9aecd
Introduce warnings reporting by missed constraints because of incorrect optimization in the constraints processor
2021-04-30 15:46:04 +03:00
Victor Petukhov
e110b49cab
Revert "Don't stop constraints processing if all type variables have proper equality constraints"
...
This reverts commit b87c2a15
2021-04-30 15:46:03 +03:00
Victor Petukhov
8dd71ec5c8
Build recursive raw types and raw types which contain type parameters properly
...
1) Substitute erasure of other type parameters
2) Use star projection at top level for recursive raw types
^KT-46126 Fixed
2021-04-30 10:49:47 +03:00
pyos
e6d923f65c
FIR: rename HIDDEN to INVISIBLE_REFERENCE
...
Some of them should be INVISIBLE_MEMBER though
2021-04-21 16:18:21 +03:00
Mikhail Glukhikh
a736d62edd
FirForLoopChecker: report also OPERATOR_MODIFIER if appropriate + minor
...
This commits checks iterator/hasNext/next functions whether they are
declared as operator or not. Also, it changes logic of hasNext/next
error reporting, now we're able to report errors about both these
functions.
2021-04-19 15:11:10 +03:00
Mikhail Glukhikh
2e14b65644
Introduce FirForLoopChecker
2021-04-19 15:10:58 +03:00
Dmitriy Novozhilov
7fb2bf00c5
Force resolve annotations in annotation checker
...
#KT-46173 Fixed
2021-04-19 14:32:36 +03:00
Ivan Kochurkin
4353365968
[FIR] Implement NULL_FOR_NONNULL_TYPE diagnostics, fix tests
2021-04-19 12:46:08 +03:00