Commit Graph

281 Commits

Author SHA1 Message Date
Mikhail Glukhikh 7243d30869 Split property use-site targets during FIR building 2021-10-12 16:22:58 +03:00
Ivan Kochurkin e97933a9e5 [FIR] Add POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATION 2021-09-13 20:48:55 +03:00
Ivan Kochurkin 55f33999f1 [FIR] Add REPEATED_ANNOTATION, REPEATED_ANNOTATION_WARNING 2021-09-10 00:49:07 +03:00
Ivan Kochurkin f414a91c66 [FIR] Implement FirInterfaceDefaultMethodCallChecker
Add diagnostics: INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET,
INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER,
DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET
2021-09-10 00:49:04 +03:00
Ivan Kochurkin 2baed77598 [FIR] Add JVM_SYNTHETIC_ON_DELEGATE diagnostic
Extract JVM names to common JvmNames
2021-09-10 00:49:03 +03:00
Ivan Kochurkin 3725c58794 [FIR] Add INAPPLICABLE_JVM_FIELD, INAPPLICABLE_JVM_FIELD_WARNING 2021-09-10 00:49:02 +03:00
Ivan Kochurkin cfd2835254 [FIR] Add JVM Default diagnostics 2021-09-10 00:48:59 +03:00
Nikolay Lunyak 1a3f47badd [FIR] Make FirJvmStaticChecker more consistent with the legacy version 2021-09-09 20:18:49 +03:00
Nikolay Lunyak 2a2c92d8b3 [FIR] Add support for JVM_STATIC_ON_EXTERNAL_IN_INTERFACE diagnostic 2021-09-09 20:18:49 +03:00
Nikolay Lunyak 7006426304 [FIR] Add support for JVM_STATIC_ON_CONST_OR_JVM_FIELD diagnostic 2021-09-09 20:18:49 +03:00
Nikolay Lunyak f3d61c199b [FIR] Add support for JVM_STATIC_ON_NON_PUBLIC_MEMBER diagnostic 2021-09-09 20:18:49 +03:00
Nikolay Lunyak c2e5583780 [FIR] Add support for JVM_STATIC_NOT_IN_OBJECT_OR_COMPANION diagnostic 2021-09-09 20:18:49 +03:00
Nikolay Lunyak 276bfd9305 [FIR] Add support for OVERRIDE_CANNOT_BE_STATIC diagnostic 2021-09-09 20:00:38 +03:00
Nikolay Lunyak 5607be3920 [FIR] Add support for INAPPLICABLE_JVM_NAME diagnostic 2021-09-09 20:00:36 +03:00
Nikolay Lunyak 5ebad97cd5 [FIR] Add support for ILLEGAL_JVM_NAME diagnostic 2021-09-09 19:58:16 +03:00
Andrey Zinovyev 865fccdd29 [FIR] Add messages for JvmRecord diagnostics
Also fix some tests
2021-08-23 10:33:24 +00:00
Andrey Zinovyev 4661656b8c [FIR] JVM_PACKAGE_NAME* diagnostics 2021-08-19 15:25:47 +03:00
Andrey Zinovyev f9b601edae [FIR] @JvmOverloads related checkers 2021-08-19 15:25:44 +03:00
Andrey Zinovyev 17ae69416c [FIR] Add SYNCHRONIZED_* diagnostics 2021-08-19 15:25:43 +03:00
Andrey Zinovyev 7ba8e0d9cc [FIR] Add VOLATILE_ON_VALUE/VOLATILE_ON_DELEGATE diagnostic 2021-08-19 15:25:43 +03:00
Andrey Zinovyev f90b534c4c [FIR] Add STRICTFP_ON_CLASS diagnostic 2021-08-19 15:25:41 +03:00
Tianyu Geng 06ee84f809 FIR checker: report AMBIGUOUS_SUPER 2021-08-10 19:36:44 +03:00
Dmitriy Novozhilov d17f984edf [FE 1.0] Migrate most of warning/error pairs to DiagnosticFactoryForDeprecation 2021-08-03 00:17:33 +03:00
Mikhael Bogdanov 4fe846fb81 Fix test affected by InstantiationOfAnnotationClasses feature 2021-07-29 19:45:57 +02: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
pyos f5dd5ead1f JVM: produce a better error on @JvmStatic external in interface
Java does not permit `static native` methods in interfaces, so this
never worked on any existing JRE.

 #KT-43696 Fixed
2021-07-16 15:24:09 +02: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 7c669b65c3 [FIR] Implement CONFLICTING_IMPORT diagnostic 2021-06-08 08:18:55 +00: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 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
Mikhail Glukhikh 2a33a6927c FIR: report WRONG_ANNOTATION_TARGET(_WITH_USE_SITE_TARGET) on declarations 2021-05-20 12:22:21 +03:00
Mikhail Glukhikh 0d6bc7e7b2 FIR: report ANNOTATION_CLASS_CONSTRUCTOR_CALL diagnostic 2021-05-20 12:22:20 +03:00
Mikhail Glukhikh 1a3aa1bff0 FIR: report ANNOTATION_PARAMETER_DEFAULT_VALUE_MUST_BE_CONSTANT 2021-05-13 16:13:44 +03:00
Mikhail Glukhikh 6618b4ea57 FirPropertyAccessorChecker: add three new diagnostics 2021-05-13 16:13:07 +03:00
Andrey Zinovyev 5d30576d28 [FIR] Report not-a-constant diagnostics inside function calls
When function calls are not fully resolved
2021-05-13 10:15:26 +03:00
Andrey Zinovyev e74141ded6 [FIR] Properly check spread constant argument 2021-05-13 10:13:21 +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 67d1c35f19 FIR: report MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED also on interfaces 2021-05-12 17:50:27 +03:00
Mikhail Glukhikh 80a449862e FIR: implement diagnostics for qualifier as stand-alone expression case 2021-04-30 17:59:45 +03:00
Mikhail Glukhikh 84ccf7bbb1 FIR: use Java 8 rules in not implemented checker 2021-04-30 17:59:38 +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
zadorotskas 334d0a8b5a FIR: introduce three diagnostics for const val 2021-04-13 21:36:46 +03:00
Ivan Kochurkin ad9b962536 [FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE) 2021-04-12 23:49:55 +03:00
Him188 f90cbb0ce7 Support properties from primary constructor in JvmFieldApplicabilityChecker
#KT-32753 In progress
2021-04-06 11:40:44 +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
Ilya Gorbunov 94240f7b21 Stabilize unsigned types KT-45653
Deprecate specialized unsigned iterators for removal.

Fix compiler tests:
- drop unsignedLiteralsOn1_2 because apiVersion 1.2 is no longer supported
- drop experimental unsigned literals diagnostic test
2021-03-31 19:05:04 +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