Alexander Udalov
5526281c54
Minor, refactor diagnostic tests on repeatable annotations
2021-07-26 14:33:32 +02:00
Leonid Startsev
83c1a75c1e
Revert "Revert "Instantiation of annotations for JVM IR with the corresponding feature flag""
...
Fix incorrectly rebased ce0a3a57df
This reverts commit 3d0126d5
2021-07-21 18:24:07 +03:00
Leonid Startsev
3d0126d5dd
Revert "Instantiation of annotations for JVM IR with the corresponding feature flag"
...
because of incorrect rebase
This reverts commit ce0a3a57
2021-07-21 15:23:24 +03:00
Leonid Startsev
ce0a3a57df
Instantiation of annotations for JVM IR with the corresponding feature flag
...
Seperate checker for platforms that do not support this language feature yet
Synthetic implementations of annotations are generated on-demand with proper
equals, hashCode, and annotationType methods
#KT-47699 Fixed
2021-07-21 10:23:51 +00:00
Mikhael Bogdanov
ff26a471b4
Update diagnostics test affected by ApproximateIntegerLiteralTypesInReceiverPosition and ProhibitSimplificationOfNonTrivialConstBooleanExpressions features
2021-07-20 12:19:57 +00:00
Andrey Zinovyev
4a37de51bb
[FIR] Add ANONYMOUS_INITIALIZER_IN_INTERFACE diagnostic
2021-07-20 13:29:00 +03:00
Dmitriy Novozhilov
c304363aea
[FE 1.0] Report WRONG_ANNOTATION_TARGET on annotations on type arguments
...
^KT-47772 Fixed
2021-07-19 14:00:24 +03:00
Dmitriy Novozhilov
afb7625d0c
[FE 1.0] Fix false positive INTEGER_OPERATOR_RESOLVE_WILL_CHANGE
...
^KT-47729 In progress
2021-07-16 15:18:44 +03:00
Mikhael Bogdanov
f080dbb78c
Update resolveAnnotations tests in new infrastructure
2021-07-15 17:08:17 +00:00
Mikhael Bogdanov
3aeb9291fe
Move resolveAnnotations tests into diagnostics tests
2021-07-15 17:08:16 +00:00
Andrey Zinovyev
b44785c24e
[FIR] NOTHING_TO_OVERRIDE diagnostic
2021-07-08 18:13:47 +03:00
Andrey Zinovyev
3f7d050f8f
[FIR] Implement CONFLICTING_INHERITED_MEMBERS diagnostic
2021-07-08 18:13:44 +03:00
Dmitriy Novozhilov
05883afc0a
Deprecate simplification of complex boolean constant expressions in whens and loops
...
^KT-39883 In Progress
2021-06-25 16:37:35 +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
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
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
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
dbc0ebd861
FIR: Update test data
...
changed INAPPLICABLE_CANDIDATE -> ARGUMENT_TYPE_MISMATCH
2021-05-20 17:24:32 +03:00
Mikhail Glukhikh
6dd41b617a
FIR: position INAPPLICABLE_FILE_TARGET on file use-site (when possible)
2021-05-20 12:22:22 +03:00
Mikhail Glukhikh
6572010eed
Introduce use-site annotation target checks for FIR
2021-05-20 12:22:22 +03:00
Mikhail Glukhikh
9a13ec9b76
FIR: report WRONG_ANNOTATION_TARGET on types
2021-05-20 12:22:22 +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
d11092ae3c
FIR: support WRONG_ANNOTATION_TARGET on expressions
2021-05-20 12:22:21 +03:00
Mikhail Glukhikh
92ab600081
FIR: add check of SOURCE retention for EXPRESSION-targeted annotation
2021-05-20 12:22:21 +03:00
Mikhail Glukhikh
4b00a43b22
FIR: add ANNOTATION_ON_SUPERCLASS diagnostic
2021-05-20 12:22:20 +03:00
Mikhail Glukhikh
0d6bc7e7b2
FIR: report ANNOTATION_CLASS_CONSTRUCTOR_CALL diagnostic
2021-05-20 12:22:20 +03:00
Igor Yakovlev
ae63ad0b6d
[FIR] Fix annotations invalid references diagnostics
2021-05-14 23:05:44 +03:00
Dmitriy Novozhilov
24b6c5df56
Add regression test for KT-45905
2021-05-14 14:30:14 +03:00
Mikhail Glukhikh
1a3aa1bff0
FIR: report ANNOTATION_PARAMETER_DEFAULT_VALUE_MUST_BE_CONSTANT
2021-05-13 16:13: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
Ivan Kochurkin
5c086e2321
[FIR] Implement NEWER_VERSION_IN_SINCE_KOTLIN diagnostics, fix tests
2021-05-12 18:42:37 +03:00
Ivan Kochurkin
1be02e3ac4
[FIR] Implement ILLEGAL_KOTLIN_VERSION_STRING_VALUE diagnostics, fix tests
2021-05-12 18:42:36 +03:00
Jinseong Jeon
e2dc21da90
FIR checker: warn useless as and is
2021-05-05 18:20:51 +03:00
Mark Punzalan
1835185b16
FIR: Remove duplicated diagnostics on annotations on types.
2021-04-26 15:11:43 +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
e0c8a6658b
FIR: handle annotations on non-containers more precisely
2021-04-21 13:22:10 +03:00
Andrey Zinovyev
2f7d6da22f
[FIR][LightTree] Generate and fix missing tests
...
Add TYPE_PARAMETERS_LIST positioning
Use whole branch as source in when branches
2021-04-20 18:13:05 +03:00
Dmitriy Novozhilov
7fb2bf00c5
Force resolve annotations in annotation checker
...
#KT-46173 Fixed
2021-04-19 14:32:36 +03:00
Dmitriy Novozhilov
1f0ecade34
[FIR] Transform annotations of type refs in body resolve stage
...
Also fix building CFG for annotation calls
2021-04-14 18:30:56 +03:00
Dmitriy Novozhilov
0b2943d34c
Prohibit using annotations without TYPE target in several type positions
...
#KT-8325 Fixed
#KT-19455 Fixed
#KT-25876 Fixed
#KT-28449 Fixed
2021-04-14 18:30:54 +03:00
Mikhail Glukhikh
69d1ef423a
FIR initializer: don't report type mismatch on incompatible extensions
...
This commit suppresses type mismatch error from KT-45989
2021-04-13 21:36:36 +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
yantimirov-timur
9e7f6332d1
[FIR] Complete WRONG_SETTER_TYPE_PARAMETER checker
2021-04-05 16:17:34 +03:00
Julia
5472199bb1
[FIR] Introduce supertypes-for-annotation-class checker
2021-04-05 15:54:57 +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