Commit Graph

115 Commits

Author SHA1 Message Date
Mikhail Glukhikh
d94930149b Warning for open members in objects 2016-01-26 19:04:17 +03:00
Mikhail Glukhikh
e4f7446bec JvmSynthetic forbidden for delegated properties (and searched for different use-site targets) 2016-01-19 11:38:53 +03:00
Mikhail Glukhikh
a2bba7c8f1 JvmField forbidden for delegated properties 2016-01-19 11:38:49 +03:00
Mikhail Glukhikh
ec909d0775 Volatile forbidden for delegated properties (and checked for other use-site targets) 2016-01-19 11:38:45 +03:00
Mikhail Glukhikh
b78d481bb1 delegate use-site targeted annotations: parser, front-end, codegen with some tests #KT-10502 Fixed 2016-01-19 11:38:41 +03:00
Michael Bogdanov
91f27ba176 Report error on 'JvmStatic' annotation on const or @JvmField property
#KT-10415 Fixed
2015-12-29 17:20:07 +03:00
Michael Bogdanov
ae4ca3b5bb Report JvmStatic diagnostic on primary constructor properties 2015-12-29 16:45:24 +03:00
Mikhail Glukhikh
f5989aa4f2 CallableMemberDescriptor.isOverridable / ClassDescriptor.isFinal refactoring
Extra JvmField and integer constants tests
2015-12-17 18:11:41 +03:00
Mikhail Glukhikh
3fb04aceb9 Check backing field availability for AnnotationTarget.FIELD #KT-10387 Fixed
Some duplicated checks deleted (UseSiteTargetChecker / JvmFieldApplicabilityChecker)
2015-12-17 15:06:58 +03:00
Dmitry Petrov
db42941586 Allow annotation constructor calls
in default parameter value expressions of anonymous classes
(if it is not a compile-time constant, it will be reported separately).

 #KT-10136 Fixed
2015-11-25 18:06:08 +03:00
Yan Zhulanow
33d67a3bf4 Fix JvmField applicability test data
(Annotation is not applied both to field & getter now)
2015-10-31 04:30:24 +03:00
Alexey Tsvetkov
dc27363452 Remove @annotation from test data 2015-10-19 20:45:01 +03:00
Svetlana Isakova
bb9f7094e0 Report 'TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH'
on call element, not on callee expression
2015-10-19 14:15:05 +03:00
Yan Zhulanow
9ae3b0fa9c Drop loading Java annotation methods as functions 2015-10-16 22:13:34 +03:00
Mikhail Glukhikh
5a16e43579 Synchronized is no more allowed on abstract functions 2015-10-13 16:37:34 +03:00
Mikhail Glukhikh
ccf0c363fa Volatile is no more allowed on values #KT-7670 Fixed 2015-10-13 16:37:24 +03:00
Pavel V. Talanov
d8be99a378 Prohibit @JvmField for private properties 2015-10-13 11:14:31 +03:00
Michael Bogdanov
f7164c5bfd Don't rename class property with JvmField annotation, report clashing 2015-10-13 11:14:31 +03:00
Pavel V. Talanov
6cf9bfdb70 publicField -> JvmField
Effectively drop publicField and introduce JvmField (which has the same effect for now)
Implement frontend checks for @JvmField
Replace publicField -> JvmField in test data
2015-10-13 10:50:08 +03:00
Alexander Udalov
34267e436e Merge two deprecation diagnostics into one DEPRECATION
This also fixes weird suppressions in user code: instead of
«@Suppress("DEPRECATED_SYMBOL_WITH_MESSAGE")» you should now use
«@Suppress("DEPRECATION")»
2015-10-13 01:44:45 +03:00
Yan Zhulanow
d90585624f Add 'DeprecationLevel' parameter to 'Deprecated' 2015-10-08 18:31:08 +03:00
Yan Zhulanow
aada13c91f Deprecate @publicField 2015-09-25 19:51:07 +03:00
Denis Zharkov
afd4e644a3 Report warning on usages of non-const vals in places where constants expected 2015-09-23 08:20:57 +03:00
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
38bafaa35c Drop annotations deprecation related things: diagnostics, quickfixes 2015-09-18 09:34:25 +03:00
Yan Zhulanow
01b2d02196 Remove @get: @set:, reorder remaining annotation targets 2015-09-11 22:32:23 +03:00
Denis Zharkov
df97496a16 Deprecate 'kotlin.throws' in favor of 'kotlin.jvm.Throws' 2015-09-10 20:39:05 +03:00
Denis Zharkov
297e9484ba Deprecate decapitalized annotations 2015-09-08 17:50:41 +03:00
Denis Zharkov
676ca86ea4 Deprecate escaped modifiers and unescaped annotations 2015-09-08 12:11:30 +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
952d45dc8b Deprecate JVM platform annotations in favor of capitilized themselves 2015-09-04 18:19:31 +03:00
Yan Zhulanow
2ce9903356 Fix tests 2015-08-31 15:33:13 +03:00
Alexander Udalov
8d9618348d Move .java and .kotlin extension properties to kotlin.jvm
Delete the old ones in package kotlin.reflect.jvm because otherwise the code
using those functions will become red in a lot less meaningful way (overload
resolution ambiguity) than if they're deleted (unresolved import)

Based on the work originally done by @dnpetrov

 #KT-8380 Fixed
2015-08-27 08:19:50 +03:00
Dmitry Jemerov
4743a69d76 rename platformName annotation to jvmName 2015-08-25 15:40:46 +02:00
Dmitry Jemerov
341f09afd3 rename platformStatic to jvmStatic 2015-08-21 16:59:05 +02: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
d6406d8d4a Annotation repetition checking with a pair of tests, some old tests changes 2015-07-28 17:13:32 +03:00
Mikhail Glukhikh
94a00540be Targeting / retention for a set of standard annotations, some inapplicable annotation checks replaced with target check, some fixed tests 2015-07-21 15:36:53 +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
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
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
Yan Zhulanow
74f44dddb0 Add tests for publicField 2015-07-07 16:35:23 +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