Dmitry Petrov
da026f1480
Report errors for annotations with BINARY or RUNTIME retention on file classes.
2015-09-21 12:11:53 +03:00
Dmitry Petrov
7f4ae52517
Generate annotations for single-file classes.
2015-09-21 12:10:40 +03:00
Denis Zharkov
4850fd10f0
Regenerate test data containing rendered descriptors
...
Introduced '@' after each annotation
2015-09-18 10:14:39 +03:00
Denis Zharkov
bae3320d52
Get rid of deprecated annotations in testData
2015-09-18 10:14:32 +03:00
Denis Zharkov
38bafaa35c
Drop annotations deprecation related things: diagnostics, quickfixes
2015-09-18 09:34:25 +03:00
Mikhail Glukhikh
22229af930
Annotation / modifier checking for setter parameters / for variables / multi declarations, tests, relevant test changes #KT-9145 Fixed
2015-09-16 09:51:37 +03:00
Yan Zhulanow
01b2d02196
Remove @get: @set:, reorder remaining annotation targets
2015-09-11 22:32:23 +03:00
Alexander Udalov
085fc3bf87
Transform anonymous types even for public symbols
...
This became necessary when we removed the requirement to specify types for
public members, because otherwise everything fails not being able to locate the
anonymous class from another module
#KT-9072 Fixed
EA-72801
2015-09-11 19:51:42 +03:00
Mikhail Glukhikh
3770e7f49f
Introduction of AnnotationTarget.CLASS as a replacement for CLASSIFIER (first step)
2015-09-11 17:59:40 +03:00
Denis Zharkov
7b3303c152
Report special diagnostic on inlineUsage with LOCAL_CONTINUE_AND_BREAK
...
Such usages should be removed by quckfixes
2015-09-10 10:04:59 +03:00
Denis Zharkov
04483eb826
Report custom diagnostic instead of symbol deprecation
...
For annotations that should be replaced with modifiers
2015-09-10 10:04:59 +03:00
Mikhail Glukhikh
1dee922861
kotlin.annotation.Target / Retention have now more priority than same java classes if import java.lang.annotation.* is available
2015-09-08 17:18:31 +03:00
Denis Zharkov
676ca86ea4
Deprecate escaped modifiers and unescaped annotations
2015-09-08 12:11:30 +03:00
Denis Zharkov
fc447e2d2f
Parse some builtin annotations as modifiers
...
But still resolve them as annotations.
Mostly it's needed as begin of migration path, one day they become modifiers anyway
Some tests are dropped because they supposed that `annotation` should have parameter
2015-09-08 08:53:35 +03:00
Michael Nedzelsky
aa44606663
fix tests in org.jetbrains.kotlin.checkers (related to KT-9072)
2015-09-08 02:06:16 +03:00
Michael Nedzelsky
bc5c9065d2
fix tests in org.jetbrains.kotlin.checkers
2015-09-08 02:04:32 +03:00
Mikhail Glukhikh
8f7b29f80a
Annotation rename: target --> @Target
2015-09-07 13:42:26 +03:00
Mikhail Glukhikh
eab288bdd7
annotation() now has no arguments. Syntax migration to Retention / Repeatable / MustBeDocumented combination
...
Deprecated test for annotation(params) completion deleted. A lot of tests changed.
2015-09-04 19:21:12 +03:00
Denis Zharkov
31244edec9
Deprecate deprecated in favor of Deprecated
2015-09-04 18:19:31 +03:00
Denis Zharkov
bbc192fda5
Deprecate suppress annotation in favor of Suppress
2015-09-04 17:23:25 +03:00
Denis Zharkov
11fed1674e
Deprecate extension annotation in favor of Extension
2015-09-04 17:23:25 +03:00
Mikhail Glukhikh
778ac7f25c
annotation --> Retention / Repeatable / MustBeDocumented: converting from Java to Kotlin and back.
...
At this very short moment Kotlin supports both annotation(retention, repeatable, mustBeDocumented) and Retention / Repeatable / MustBeDocumented separately.
2015-09-04 12:49:36 +03:00
Mikhail Glukhikh
4e3bd10cd3
Java annotation with target "TYPE" is now applicable to Kotlin targets "CLASSIFIER" and "FILE"
2015-09-04 12:49:24 +03:00
Yan Zhulanow
2ce9903356
Fix tests
2015-08-31 15:33:13 +03:00
Yan Zhulanow
f86fe6a8d5
Allow multiple non-repeatable annotations with different targets
2015-08-31 15:33:02 +03:00
Yan Zhulanow
b38b7071b7
Targeted annotation diagnostic tests
2015-08-31 15:32:53 +03:00
Alexander Udalov
9882e86ecb
Don't render contents of enum entry classes in .txt tests, regenerate tests
...
They are irrelevant because cannot be accessed from the outside anyway
2015-08-28 21:11:06 +03:00
Mikhail Glukhikh
4bd48c4796
Regular modifier checker implemented (initial version). A set of tests fixed accordingly.
...
Most of modifier diagnostic is expressed by REDUNDANT_MODIFIER, INCOMPATIBLE_MODIFIERS, REPEATED_MODIFIER, WRONG_MODIFIER_TARGET, WRONG_MODIFIER_PARENT.
A set of modifier diagnostics is not in use now (but not deleted yet).
2015-08-03 19:41:50 +03:00
Mikhail Glukhikh
faac06ff7e
Annotation option 'mustBeDocumented': definition, mapping from Kotlin to Java Documented and back, tests
2015-08-03 19:41:48 +03:00
Mikhail Glukhikh
dfaed3fef3
Binary or runtime repeatable annotations are not allowed for JVM. Some tests fixed accordingly.
2015-08-03 19:41:45 +03:00
Mikhail Glukhikh
a072550931
Class is an annotation iff it is annotated by kotlin.annotation.annotation, or is kotlin.annotation.annotation itself.
...
JetClassOrObject.isAnnotation() is no more in use during resolve. Additional test.
2015-07-29 16:28:26 +03:00
Mikhail Glukhikh
a86857fbb5
Java Deprecated is mapped in accordance with Java Target / Retention, some diagnostic changed
2015-07-28 17:13:37 +03:00
Mikhail Glukhikh
d6406d8d4a
Annotation repetition checking with a pair of tests, some old tests changes
2015-07-28 17:13:32 +03:00
Mikhail Glukhikh
11f87e6ca1
No more java Target / Retention loaded. Render java Retention / Target. Related test changes.
2015-07-22 19:00:39 +03:00
Mikhail Glukhikh
c2480d1183
Java to Kotlin annotation retention mapping + new test + JvmLoader test adaptation
2015-07-22 19:00:26 +03:00
Mikhail Glukhikh
9e7a67fabf
Warning about java.lang.annotation.Target annotation usage
2015-07-21 15:20:37 +03:00
Mikhail Glukhikh
1309c1f95f
Annotation mapper is introduced to map java annotation targets to kotlin targets + a set of new / fixed tests
2015-07-21 15:20:31 +03:00
Mikhail Glukhikh
af5e7f58da
Implementation of Kotlin's 'target' annotation mapping to Java's 'Target' annotation + tests
2015-07-17 12:05:27 +03:00
Mikhail Glukhikh
2a1058ed63
Some usages of JetClassOrObject.isAnnotation() are removed. Related test fixed.
2015-07-17 12:05:19 +03:00
Mikhail Glukhikh
7f12965741
Suppress test corrected
2015-07-17 12:05:15 +03:00
Pavel V. Talanov
c313887641
Split CompileTimeConstant into two entities
...
1. ConstantValue
* just holds some value and its type
* implementations for concrete constants
2. CompileTimeConstant
* is only produced by ConstantExpressionEvaluator
* has additional flags (canBeUsedInAnnotation etc)
* has two implementations TypedCompileTimeConstant containing a constant value
and IntegerValueConstant which does not have exact type
* can be converted to ConstantValue
Adjustt usages to use ConstantValue if flags are not needed
Add tests for some uncovered cases
2015-07-16 02:28:05 +03:00
Mikhail Glukhikh
37b2e97e56
Rendering changed: "annotation class" is now just "class" (with kotlin.annotation.annotation if it's kotlin annotation).
...
A swarm of tests fixed accordingly.
2015-07-14 16:25:08 +03:00
Mikhail Glukhikh
0d2a81f098
Annotation target checking in front-end, a set of tests for different annotation targets, existing test fixes
...
No checks for erroneous annotations. Additional checks for identifiers.
2015-07-14 16:25:04 +03:00
Mikhail Glukhikh
609d696202
Annotations have now retention of "RUNTIME" by default. Java retention is generated as given by kotlin annotation. Annotation rendering changed.
...
Annotation arguments with default values are rendered as ... if renderDefaultAnnotationArguments is true.
Tests: java retention does not taken into account by Descriptor comparator.
Java retentinon changed to kotlin retention in some tests + one new test with java retention added.
More accurate tests for intentions in byte code (visibility controlled).
2015-07-14 16:25:01 +03:00
Mikhail Glukhikh
1eac4d67de
"annotation" is now parsed as an identifier. It is no longer a soft keyword.
...
Sometimes it's allowed to parse "annotation" unescaped even if other annotations must be escaped.
A set of annotations and their options tests.
A swarm of existing tests fixed (mostly kotlin.annotation.annotation() added to txt-files).
STUB_VERSION increased. Some quick fixes slightly changed.
2015-07-14 16:24:55 +03:00
Mikhail Glukhikh
bae9a7d7f8
Types are no more rendered for annotation arguments + a swarm of tests corrected accordingly
2015-07-01 16:12:32 +03:00
Alexander Udalov
3a6ba67602
Delete unused diagnostic about j.l.Class in annotations
2015-06-15 15:55:23 +03:00
Denis Zharkov
da254ab1a0
Drop support of java.lang.Class as annotation parameter
...
Also drop some related diagnostics and testData
2015-06-12 09:55:12 +03:00
Denis Zharkov
26864a4407
Get rid of annotation syntax deprecation related things
2015-06-12 09:23:32 +03:00
Mikhail Glukhikh
f9fe8cd341
Fixed annotation resolve for loop parameter or catched exceptions type
2015-06-10 18:38:27 +03:00