Victor Petukhov
2d3ed4b7da
Update FIR test data
2021-06-04 13:25:10 +03:00
Ivan Kochurkin
c4c2fbb5a0
[FIR] Implement RECURSIVE_TYPEALIAS_EXPANSION, CYCLIC_INHERITANCE_HIERARCHY diagnostics, fix stackoverlow exception in case if typealias points to type with type arguments
2021-06-03 20:41:58 +03:00
Mark Punzalan
d1531f9cdd
FIR: Choose a resolved candidate for augmented assignment when both
...
assign and operator candidates are unsuccessful.
2021-06-03 20:18:04 +03:00
Mark Punzalan
32bb64a225
FIR: Report UNSAFE_OPERATOR_CALL for augmented assignments (was
...
reporting UNSAFE_CALL).
2021-06-03 20:18:03 +03:00
Mark Punzalan
6de1000818
FIR: Report UNSAFE_INFIX_CALL for all infix-style calls, even if the
...
candidate is not an infix function.
This mirrors FE 1.0 (see
`AbstractTracingStrategy.reportUnsafeCallOnBinaryExpression()`) and
allows consistent handling for quickfixes on infix calls.
2021-06-03 20:18:01 +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
da15f0ffe8
[FIR] Consider fullyExpandedType instead of original type in isSubtypeForTypeMismatch, consider lookupTag in isError method
2021-06-03 18:24:36 +03:00
Ivan Kochurkin
0b0a96a1d3
[FIR] Fix processing of nested type arguments, extract extractTypeRefAndSourceFromTypeArgument method to FirHelpers and use it from FirClassVarianceChecker and FirConflictingProjectionChecker
2021-06-03 18:24:35 +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
03e577bf98
[FIR] Implement CONFLICTING_PROJECTION_IN_TYPEALIAS_EXPANSION diagnostics, fix tests
2021-06-03 18:24:32 +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
Dmitriy Novozhilov
796f8e6bce
Revert "FIR checkers: report SMARTCAST_IMPOSSIBLE"
...
This reverts commit 84334b08
2021-06-03 09:48:50 +03:00
Tianyu Geng
84334b087c
FIR checkers: report SMARTCAST_IMPOSSIBLE
2021-06-02 13:19:12 +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
Mikhael Bogdanov
b72aa76415
Support class type parameters annotation checking
2021-06-01 06:33:51 +02:00
Mikhael Bogdanov
a8186d19d6
Support annotations on class type parameters
...
#KT-43714
2021-06-01 06:33:50 +02: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
76c15e4444
Don't update null recorded type prematurely in ResolvedAtomCompleter
2021-05-28 15:36:23 +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
Andrey Zinovyev
ebf6ce133b
[FIR] Fix kotlin version check in annotations
...
@RequireKotlin has more than one string parameter, so you need to check
'version' only
2021-05-28 12:24:58 +03:00
Tianyu Geng
61475c48e2
FIR: fix VALUE_ARGUMENTS position strategy
2021-05-26 14:46:18 +03:00
Mark Punzalan
af99ad0736
FIR checker: Report VAL_OR_VAR_ON_*_PARAMETER.
2021-05-25 20:39:34 +03:00
Andrey Zinovyev
dce8bd4e62
[FIR] Support constructor call of unsigned in checker
2021-05-25 19:23:29 +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
Ivan Kochurkin
cf531dbbe6
[FIR] Implement TYPE_VARIANCE_CONFLICT, TYPE_VARIANCE_CONFLICT_IN_EXPANDED_TYPE diagnostics, fix tests
2021-05-25 00:07:33 +03:00
Ivan Kochurkin
ef53f0e0b3
[FIR] Render diagnostics parameters instead of full text in debug messages (closer to old tests)
2021-05-25 00:07:32 +03:00
Mark Punzalan
d2b8204fdc
FIR/FIR IDE: Use entire FirVariableAssignment when reporting UNSAFE_CALL
...
(e.g., `nullable.a = b`), and use positioning strategies to locate the
dot in the LHS expression.
Without it, only the callee reference is reported on, which makes the
highlighting of the error and application of quickfixes incorrect in the
IDE.
Also fixed issue with annotated and/or labeled expressions on LHS of
assignment (e.g., `(@Ann label@ i) = 34`).
2021-05-20 20:32:58 +02:00
Dmitriy Novozhilov
3fc7e0ed03
[FIR] Remove COMPARE_WITH_LIGHT_TREE from default directives of fir diagnostic tests
2021-05-20 20:20:40 +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
9265377d51
FIR: Update test data (SAM conversions)
...
See KT-46372
2021-05-20 17:24:39 +03:00
Denis.Zharkov
601500fd99
FIR: Update test data (extension function type -> function type)
...
See KT-46371
2021-05-20 17:24:38 +03:00