Commit Graph

385 Commits

Author SHA1 Message Date
Ivan Kylchik 51ccc32a3f Update test data after introducing IntrinsicConstEvaluation annotation 2022-05-18 21:19:57 +03:00
Ivan Kochurkin 8c7fad9a5e [FIR] Support of type arguments in annotations ^KT-48444 Fixed 2022-04-18 15:36:19 +00:00
Victor Petukhov 27fa632630 [FE 1.0] Update test data with new error type representation 2022-03-23 21:13:33 +00:00
Ivan Kochurkin 73b45a1254 [FIR] Report UNSUPPORTED on array literals not from annotation classes ^KT-50750 Fixed 2022-02-23 14:21:57 +03:00
Vladimir Dolzhenko 918a91dbdf Escape special names with backticks in test data
#KT-51248
2022-02-10 21:20:47 +00:00
Dmitriy Novozhilov 52b72a7dac [FIR] Implement Int -> Long conversions for literals and operators over them
^KT-38895
^KT-50996 Fixed
^KT-51000 Fixed
^KT-51003 Fixed
^KT-51018 Fixed
2022-02-07 13:36:36 +03:00
Dmitriy Novozhilov 1a3841d66d [FIR] Properly enhance raw Class type in java annotations 2022-01-20 11:25:44 +03:00
Mikhail Glukhikh 1274e2b90a Deprecate ExtensionFunctionType on a non-function types
Related to KT-43527
2022-01-14 22:20:44 +03:00
Mikhail Glukhikh d0fa3eb1d3 Forbid ExtensionFunctionType on functional types without parameters
#KT-43527 Fixed
2022-01-14 22:20:24 +03:00
Mikhail Glukhikh 1402bb2d45 Fix error message about unsupported annotations on type parameters
#KT-48908 Fixed
2022-01-14 22:20:22 +03:00
Dmitriy Novozhilov 9f870b0549 [FIR] Report errors on cycles in annotation parameter types
^KT-47932
2022-01-14 14:26:53 +03:00
Dmitriy Novozhilov e9ac24dc33 [FE 1.0] Report errors on cycles in annotation parameter types
^KT-47932
^KT-50753 Fixed
2022-01-14 14:26:52 +03:00
Dmitriy Novozhilov 139a800ff7 [FE 1.0] Prohibit array literals inside nested objects of annotation classes
^KT-39041
^KT-50749 Fixed
2022-01-14 14:26:51 +03:00
Dmitriy Novozhilov 8707be51c9 [FIR] Report errors about invisible types from type resolution 2021-11-26 11:26:17 +03:00
Ivan Kochurkin 4caf3c5e83 [FIR] Add NOT_A_CLASS diagnostics 2021-11-24 23:13:40 +03:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Dmitriy Novozhilov 62b774b2e3 [FE 1.0] Properly report INTEGER_OPERATOR_RESOLVE_WILL_CHANGE
^KT-38895
2021-11-16 13:29:12 +03:00
Ivan Kochurkin 2b5524b18f [FIR] Add CAST_NEVER_SUCCEEDS 2021-11-12 15:20:44 +03:00
Mads Ager b79ca7d7df [FIR] Allow annotation instantiation.
This commit disables the frontend error reporting for supported cases.
2021-11-09 23:51:48 +03:00
Denis.Zharkov fba44759c0 FIR: Refine visibility check for class members 2021-10-20 22:05:23 +03:00
Mikhail Glukhikh c5a4a5de42 Make FirArrayOfCallTransformer recursive #KT-49076 Fixed 2021-10-15 01:24:49 +03:00
Mark Punzalan 4f0b52b653 FIR: Transform annotations on type arguments during body resolve. 2021-10-12 18:56:32 +03:00
Mikhail Glukhikh 7243d30869 Split property use-site targets during FIR building 2021-10-12 16:22:58 +03:00
Mikhail Glukhikh 2a9a1dbb86 FIR: allow diagnostic collection on default property accessors 2021-10-12 16:22:56 +03:00
Jinseong Jeon 8f3b06ac06 RAW FIR: record annotations on destructuring declarations 2021-10-01 18:54:16 +03:00
Dmitriy Novozhilov 7917e511ed [FE 1.0] Disable INTEGER_OPERATOR_RESOLVE_WILL_CHANGE warning by default
Also remove sinceVersion parameter from
  ApproximateIntegerLiteralTypesInReceiverPosition language feature

^KT-48992 Fixed
2021-09-29 21:23:22 +03:00
Ivan Kochurkin 55f33999f1 [FIR] Add REPEATED_ANNOTATION, REPEATED_ANNOTATION_WARNING 2021-09-10 00:49:07 +03:00
Ivan Kochurkin fa12e72551 [FIR] Add REPEATABLE_CONTAINER_* diagnostics
REPEATABLE_CONTAINER_MUST_HAVE_VALUE_ARRAY
REPEATABLE_CONTAINER_HAS_NON_DEFAULT_PARAMETER
REPEATABLE_CONTAINER_HAS_SHORTER_RETENTION
REPEATABLE_CONTAINER_TARGET_SET_NOT_A_SUBSET
REPEATABLE_ANNOTATION_HAS_NESTED_CLASS_NAMED_CONTAINER
2021-09-10 00:49:07 +03:00
Ivan Kochurkin 6fa1c0353c Use deprecation type for some REPEATABLE_* diagnostics 2021-09-10 00:49:06 +03:00
Ivan Kochurkin 97bc079634 [FIR] Add REPEATED_ANNOTATION_WITH_CONTAINER, NON_SOURCE_REPEATED_ANNOTATION
REPEATED_ANNOTATION_TARGET6
2021-09-10 00:49:03 +03:00
Mark Punzalan 580f1d51f6 FIR checker: report LOCAL_VARIABLE_WITH_TYPE_PARAMETERS 2021-08-26 12:25:07 +03:00
Mikhail Glukhikh 3f8734f694 FIR: determine synthetic accessor modality more precisely
Related to KT-47542
2021-08-24 12:32:30 +03:00
Mikhail Glukhikh bbb76aae3f Provide more precise check for ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
#KT-47542 Fixed
2021-08-24 12:32:30 +03:00
Andrey Zinovyev ae558c0290 [FIR] Add DEPRECATED_JAVA_ANNOTATION diagnostic 2021-08-19 15:25:46 +03:00
Ivan Kochurkin 2c1c24c042 [FIR] Implement WRONG_MODIFIER_CONTAINING_DECLARATION, DEPRECATED_MODIFIER_CONTAINING_DECLARATION 2021-08-13 18:32:28 +03:00
Ivan Kochurkin cd6384eb20 [FIR] Fix handling of WRONG_MODIFIER_TARGET
Implement DEPRECATED_MODIFIER, DEPRECATED_MODIFIER_FOR_TARGET, REDUNDANT_MODIFIER_FOR_TARGET
2021-08-13 18:32:27 +03:00
Dmitriy Novozhilov b584fed93d [FIR] Migrate warning/error pairs to DiagnosticFactoryForDeprecation 2021-08-03 00:20:11 +03:00
Dmitriy Novozhilov d17f984edf [FE 1.0] Migrate most of warning/error pairs to DiagnosticFactoryForDeprecation 2021-08-03 00:17:33 +03:00
Alexander Udalov 847c58d574 Report error on class named Container inside repeatable annotation
#KT-12794
 #KT-47971
2021-07-30 19:53:44 +02:00
Alexander Udalov e20b354dbd Check repeatable annotation container parameters, retention, target
#KT-12794
 #KT-47928
2021-07-30 19:53:33 +02:00
Alexander Udalov 67128c022a Report error if both repeatable annotation and its container are used
#KT-12794
2021-07-30 19:53:32 +02:00
Alexander Udalov b2550f69bc Report error if repeated annotation is used with JVM target 1.6
#KT-12794
2021-07-30 19:53:32 +02:00
Alexander Udalov 87130edfa2 Support using Java-repeatable annotations in Kotlin
#KT-12794
2021-07-30 19:53:32 +02:00
Alexander Udalov f723389565 Remove mapping of java.Repeatable to kotlin.Repeatable in JavaAnnotationMapper
The main motivation for this change is that
java.lang.annotation.Repeatable has a parameter for the container
annotation, which is lost during conversion to
kotlin.annotation.Repeatable. To support j.l.a.Repeatable in backend
properly, it's absolutely necessary to be able to load the container
annotation for any repeatable annotation class, so the original
j.l.a.Repeatable needs to be stored in the descriptor and accessible
from the backend.

Instead of mapping j.l.a.Repeatable -> k.a.Repeatable, add a frontend
service PlatformAnnotationFeaturesSupport that will determine if an
annotation is repeatable "according to the platform rules", which for
JVM means that it's annotated with j.l.a.Repeatable.

Some effects of this change include:
- Usages of j.l.a.Repeatable are no longer reported as "deprecated", the
  corresponding test is deleted
- Usages of repeatable annotations declared in Java with non-SOURCE
  retention with LV 1.5 and earlier will now result in a slightly
  different error (REPEATED_ANNOTATION instead of
  NON_SOURCE_REPEATED_ANNOTATION)

 #KT-12794
2021-07-30 19:53:32 +02:00
Mikhael Bogdanov 4fe846fb81 Fix test affected by InstantiationOfAnnotationClasses feature 2021-07-29 19:45:57 +02:00
Mikhael Bogdanov cc5ba4c0af Update diagnostic tests 2021-07-29 19:45:54 +02:00
Mikhael Bogdanov 38fb5e16ef Update test affected by ApproximateIntegerLiteralTypesInReceiverPosition feature 2021-07-29 19:45:54 +02:00
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