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
Mikhail Glukhikh
b0ec3cb831
Switch off FIR version off REDUNDANT_LABEL_WARNING (performance-related)
...
This reverts commit 363b2550 (partially)
2021-10-27 12:26:59 +03:00
Tianyu Geng
363b25504d
FIR checker: report REDUNDANT_LABEL_WARNING
...
Since many labels are not present in the FIR tree, this checker is
implemented as a syntax checker. Comparing with FE1.0, this change
reports some REDUNDANT_LABEL_WARNING that FE1.0 has missed, especially
LHS of assignments.
2021-10-25 13:51:01 +03:00
Tianyu Geng
a297ee66d4
FIR: suppress VARIABLE_EXPECTED for error reference
2021-10-05 15:30:39 +03:00
Tianyu Geng
c572bf05b5
FIR checker: honor DSL marker annotation on the function type
...
It seems the original function type gets lost during resolution. Hence
thie change added a custom attribute to recover the original function
type on an anonymous function
2021-10-05 15:30:38 +03:00
Tianyu Geng
826ea122a9
FIR checker: DSL_SCOPE_VIOLATION
2021-10-05 15:30:37 +03:00
Tianyu Geng
7aaac2573c
FIR: preserve diagnostics in createResolvedNamedReference
2021-10-05 15:30:35 +03:00
Mark Punzalan
b8ed46066e
FIR: Change diagnostic for ConeHiddenCandidate to UNRESOLVED_REFERENCE.
...
The KDoc for @Deprecated states that DeprecationLevel.HIDDEN usages
should look like unresolved references.
2021-09-29 19:39:17 +03:00
Mark Punzalan
58eb329fb9
FIR: Make CheckDeprecatedSinceKotlin the first resolution stage.
...
All subsequent stages don't need to run if the candidate is
@Deprecated(HIDDEN).
2021-09-29 19:39:14 +03:00
Tianyu Geng
e95de0a778
FIR checker: report type mismatch for named vararg arguement
...
ProhibitAssigningSingleElementsToVarargsInNamedForm is enabled from 1.3
so there is no need to make FIR accepting single element passed through
named arguments.
In addition, we may want to report only
ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_FUNCTION and not arg
type mismatch. But FE1.0 is reporting both so I am following it. If we
want to remove the redundant report, we will probably want to remove
FirNamedVarargChecker and report during resolution as a cone diagnostic.
2021-09-15 12:11:36 +03:00
Dmitriy Novozhilov
88913aa2a3
[FIR] Report warning on non-deprecated overrides of deprecated members
...
^KT-47902
2021-09-02 15:04:07 +03:00
Dmitriy Novozhilov
ef9ad5af51
[FE 1.0] Report warning on non-deprecated overrides of deprecated members
...
Also don't propagate deprecation status to overrides after 1.7
^KT-47902 Fixed
2021-09-02 15:04:07 +03:00
Ivan Kochurkin
84c5f58cab
[FIR] Implement UNRESOLVED_REFERENCE_WRONG_RECEIVER
2021-08-25 21:53:23 +00:00
Ivan Kochurkin
34cc7e5199
[FIR] Fix resolving to star import member instead of builtin (^KT-48157 Fixed)
2021-08-25 21:53:23 +00:00
Andrey Zinovyev
1cdbbad367
[FIR] ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_FUNCTION diag
2021-08-17 16:05:42 +03:00
Victor Petukhov
cd09c8ba51
Report CANNOT_INFER_PARAMETER_TYPE on any error value parameters of a lambda
...
^KT-48058 Fixed
2021-08-06 13:27:57 +03:00
Ivan Kochurkin
1a40164ef0
[FIR] Fix resolving of single underscore _
...
Now compiler throws `UNRESOLVED_REFERENCE` here:
```
val boo = { _: Exception -> `_`.stackTrace }
```
2021-07-30 16:58:07 +00:00
Ivan Kochurkin
8bfaa39a5c
[FIR] Implement RESOLVED_TO_UNDERSCORE_NAMED_CATCH_PARAMETER
...
Split underscore checkers
2021-07-30 16:58:07 +00:00
Ivan Kochurkin
d4e1cded59
[FIR] Implement RESOLUTION_TO_CLASSIFIER
2021-07-28 23:18:38 +03:00
Ivan Kochurkin
2574dc907c
[FIR] Implement FUNCTION_EXPECTED
2021-07-28 23:17:31 +03:00
Andrey Zinovyev
de3f31cf78
[FIR] Partial implementation of DEPRECATION(_ERROR) diagnostics
...
No support for inheritance deprecations
and deprecations in qualifier's parts
2021-07-07 16:19:28 +03:00
Ivan Kochurkin
59257e47c9
[FIR] Implement FUNCTION_CALL_EXPECTED
2021-06-29 22:39:22 +03:00
Denis.Zharkov
46b297477c
Deprecate ambiguous cases in FE 1.0: companion property vs enum entry
...
^KT-37591 Fixed
2021-06-25 18:41:12 +03:00
Dmitriy Novozhilov
09994ee8ea
[FIR] Make type of safe call always nullable
...
^KT-46860 In Progress
2021-06-25 16:37:32 +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
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
54b9f39b3a
Update tests after rebase
2021-05-28 15:36:24 +03:00
Victor Petukhov
4a767c597e
Don't report the same diagnsotics several times
2021-05-28 15:36:23 +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
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
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
Andrey Zinovyev
07a8ae7e71
[FIR] Mark more calls origin as OPERATOR
2021-05-20 13:46:32 +03:00
Ivan Kochurkin
e57108d4e8
[FIR] Implement ASSIGNMENT_TYPE_MISMATCH, RESULT_TYPE_MISMATCH diagnostics, fix tests
2021-05-17 22:33:16 +03:00
Jinseong Jeon
bdfc879f00
FIR checker: report UNINITIALIZED_PARAMETER
2021-05-10 14:26:14 +03:00
Mikhail Glukhikh
80a449862e
FIR: implement diagnostics for qualifier as stand-alone expression case
2021-04-30 17:59:45 +03:00
Ivan Kochurkin
525cc6df97
[FIR] Implement MANY_LAMBDA_EXPRESSION_ARGUMENTS diagnostics, fix tests
2021-04-28 16:21:48 +03:00
Ivan Kochurkin
ea2d9f7c0c
[FIR] Implement UNDERSCORE_IS_RESERVED, UNDERSCORE_USAGE_WITHOUT_BACKTICKS diagnostics (psi only)
2021-04-27 17:03:52 +03:00
Jinseong Jeon
24d792fb49
FIR checker: warn useless elvis
2021-04-22 13:10:54 +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
Andrey Zinovyev
ee48fc320d
[FIR][LightTree] Mark fake nodes in FOR loop
...
+ fix bunch of tests
2021-04-20 18:13:02 +03:00
Tianyu Geng
454ae3b17a
FIR checker: report UNSAFE_CALL for overloaded function calls
...
Previously if an unsafe call is to an overloaded function, FIR checkers
report NONE_APPLICABLE. This change instead report them as UNSAFE_CALL
or its variants.
2021-04-19 15:11:13 +03:00
Tianyu Geng
6a03f31e50
FIR: add UnsafeCall resolution diagnostics
...
Previously unsafe call is reported as part of InapplicableWrongReceiver.
This makes it difficult for the downstream checkers to report different
diagnostics.
2021-04-19 15:11:13 +03:00
Dmitriy Novozhilov
e869f8091a
[FIR] Properly handle callable references which were resolved with error
2021-04-16 11:12:55 +03:00
Andrey Zinovyev
5ff82addc9
[FIR] Add REIFIED_TYPE_PARAMETER_NO_INLINE check
2021-04-14 18:11:10 +03:00
vldf
57d2eb5da2
Introduce FirFunctionReturnTypeMismatchChecker
2021-04-13 21:36:33 +03:00
vldf
24f1f1221e
Introduce FirInitializerTypeMismatchChecker
2021-04-13 21:36:31 +03:00
Ivan Kochurkin
ad9b962536
[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)
2021-04-12 23:49:55 +03:00