Commit Graph

117 Commits

Author SHA1 Message Date
Dmitrii Gridin 9a267176f5 [FIR] move deprecation calculation to COMPILER_REQUIRED_ANNOTATIONS phase
Also, this change adds SinceKotlin and Java.Deprecated to this phase
It fixes some problems with API_NOT_AVAILABLE, so now it is closer to K1

^KT-57648 Fixed
^KT-55723 Fixed
2023-05-11 10:31:52 +00:00
Kirill Rakhman 1f29490118 [FIR] Report when typealias expansion contains deprecated type
#KT-57843 Fixed
2023-04-13 10:50:36 +00:00
Kirill Rakhman 206fad4256 [FIR] Report deprecations on deprecated super constructor calls
#KT-57350 Fixed
2023-04-13 10:50:35 +00:00
Dmitrii Gridin 19dbe69651 [FIR] move deprecations calculation on TYPES phase
can be moved to COMPILER_REQUIRED_ANNOTATIONS phase in the future

^KT-57256 Fixed
2023-03-29 08:52:37 +00:00
Nikolay Lunyak bcfafc601e Add EnumEntries to minimal-stdlib-for-tests
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.

Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
2023-03-02 10:23:38 +00:00
Kirill Rakhman 9dda5e4fcd [Test] Remove redundant FIR_DISABLE_LAZY_RESOLVE_CHECKS directives
KT-56177
2023-02-28 10:19:18 +00:00
Ilya Kirillov 644d1bf0d0 [FIR] ignore tests which fail because of resolve contracts violation 2022-12-12 16:21:07 +00:00
Dmitriy Novozhilov 248c45acb3 [FIR] Properly set resolvedToCompanionObject field for lhs of GetClassCall
^KT-54209 Fixed
2022-10-19 11:09:32 +00:00
Dmitriy Novozhilov 55aae5325c [Test] Add test for KT-54209 2022-10-19 11:09:32 +00:00
Ilya Kirillov 556b7894d5 [Low Level FIR] do not search for declarations from kotlin. package in source modules 2022-09-30 12:15:49 +02:00
Mikhail Glukhikh a9b8f6715b Revert "[FE 1.0] Resolve setters through the new type inference infra"
This reverts commit 6e191147b9.
2022-09-13 09:09:00 +00:00
Mikhail Glukhikh 8be08d903b Revert "K1: don't report UNRESOLVED_WITH_TARGET on hidden setters"
This reverts commit e20efc1398.
2022-09-13 09:08:59 +00:00
Mikhail Glukhikh e20efc1398 K1: don't report UNRESOLVED_WITH_TARGET on hidden setters 2022-07-22 16:03:53 +00:00
Victor Petukhov 6e191147b9 [FE 1.0] Resolve setters through the new type inference infra
^KT-48961 In progress
2022-07-22 16:03:50 +00:00
Ivan Kylchik 51ccc32a3f Update test data after introducing IntrinsicConstEvaluation annotation 2022-05-18 21:19:57 +03:00
Dmitriy Novozhilov 989cef6c3c [FE 1.0] Don't report OVERRIDE_DEPRECATION on default accessors of deprecated properties
^KT-51893 Fixed
2022-04-15 08:30:05 +00:00
Dmitriy Novozhilov b2b5f4a63a [FE 1.0] Don't report deprecation diagnostics about enum on it's own entries
^KT-37975 Fixed
2022-01-12 19:11:28 +03:00
Mark Punzalan 42abc4a3af FIR: Don't use AnnotationUseSiteTarget.PROPERTY_GETTER when computing
deprecation from a callable reference use site.

Also fixed positioning of DEPRECATION(_ERROR) diagnostics on variable
assignments.
2021-09-29 19:39:17 +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 63cc18b095 FIR: Add test for candidate behind hidden property accessors.
See KT-48799.
2021-09-29 19:39:13 +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
Andrey Zinovyev 8a0941a85a [FIR] Report deprecations in qualified expressions 2021-07-26 14:50:54 +03:00
Andrey Zinovyev 15be38192b [FIR] Mark implicit types in accessors as fake
To not check their types in deprecation checker
2021-07-20 14:25:14 +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
Andrey Zinovyev 9fad55d551 [FIR] Use @DeprecatedSinceKotlin in the resolution 2021-07-07 16:19:27 +03:00
Denis.Zharkov 5ade831665 FIR: Fix INFERENCE_NO_INFORMATION_FOR_PARAMETER on type alias with generic expansion
^KT-46996 Fixed
2021-06-07 15:25:55 +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
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
Ivan Kochurkin 52c32d3d85 [FIR] Implement DEPRECATED_SINCE_KOTLIN_OUTSIDE_KOTLIN_SUBPACKAGE, fix tests 2021-05-12 18:42:43 +03:00
Ivan Kochurkin 177394f6ef [FIR] Implement DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL, fix tests 2021-05-12 18:42:42 +03:00
Ivan Kochurkin 77c137df22 [FIR] Add DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED diagnostics, fix tests 2021-05-12 18:42:41 +03:00
Ivan Kochurkin 3191e0b925 [FIR] Implement DEPRECATED_SINCE_KOTLIN_WITHOUT_ARGUMENTS diagnostics, fix tests, merge and refactor annotation checkers 2021-05-12 18:42:40 +03:00
Ivan Kochurkin dc99a673a5 [FIR] Implement DEPRECATED_SINCE_KOTLIN_WITH_UNORDERED_VERSIONS diagnostics, fix tests 2021-05-12 18:42:38 +03:00
Ivan Kochurkin 1be02e3ac4 [FIR] Implement ILLEGAL_KOTLIN_VERSION_STRING_VALUE diagnostics, fix tests 2021-05-12 18:42:36 +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
Mikhail Glukhikh 566dc434cc FIR: introduce MANY_*_MEMBER_NOT_IMPLEMENTED diagnostic 2021-04-02 10:24:20 +03:00
Dmitriy Novozhilov cd890d5833 [Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite 2021-03-29 16:12:29 +03:00
Dmitriy Novozhilov b44dc55109 [TD] Mute some javac tests or update their testdata
There was a refactoring of AbstractDiagnosticsTest in 9052ef06 which
  contains bug that `setupEnvironment` for AbstractDiagnosticsTestUsingJavac
  was not called, so for last year tests `UsingJavac` had no difference
  with usual diagnostics tests which causes some contradictions in test data
2020-12-16 19:52:25 +03:00
Dmitriy Novozhilov e6b5cb5216 [TD] Update diagnostics test data due to new test runners
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
2020-12-16 19:52:25 +03:00
Dmitriy Novozhilov 721b9b4d8c [FIR] Resolve annotations as calls 2020-08-04 08:59:14 +03:00
Mikhail Zarechenskiy 678b76cab1 Fix presence of Deprecated hidden annotation for reference arguments
#KT-40234 Fixed
2020-07-13 11:23:28 +03:00
Mikhail Zarechenskiy a2da00eb49 Prohibit using DeprecatedSinceKotlin outside kotlin subpackage 2020-06-29 14:25:08 +03:00
Mikhail Zarechenskiy 790433984b Prohibit using DeprecatedSinceKotlin annotation without arguments 2020-06-29 14:25:08 +03:00
Mikhail Zarechenskiy 67100d5ebe Reject values of DeprecatedSince.. that are not parseable as a version 2020-06-29 14:25:07 +03:00
Mikhail Zarechenskiy 5d88058928 Place DeprecatedSinceKotlin annotation under 1.4 version 2020-06-29 14:25:06 +03:00
Mikhail Zarechenskiy 2f55a3fa0d Add various test for DeprecatedSinceKotlin annotation 2020-06-29 14:23:26 +03:00
Mikhail Zarechenskiy 158013ef3a Remove message and replaceWith parameters from DeprecatedSinceKotlin 2020-06-29 14:22:33 +03:00
Mikhail Zarechenskiy 60c51476f2 Introduce declaration checker for DeprecatedSinceKotlin annotation
- DeprecatedSinceKotlin annotation should only be applicable when
   there's `@Deprecated` annotation on the same declaration
 - Deprecation level shouldn't be specified in the relevant
   `@Deprecated` annotation
 - Check that warningSince <= errorSince <= hiddenSince
2020-06-29 14:22:32 +03:00
Alexander Udalov 0aaf29c045 Introduce DeprecatedSinceKotlin annotation
This annotation will be used in the standard library to prevent the new
compiler from reporting deprecation diagnostics in case an older API
version is used (where the declaration was not deprecated yet).

 #KT-23575 Fixed
2020-06-29 14:22:29 +03:00