Targeting / retention for a set of standard annotations, some inapplicable annotation checks replaced with target check, some fixed tests

This commit is contained in:
Mikhail Glukhikh
2015-07-16 11:35:28 +03:00
parent a75daf85e2
commit 94a00540be
53 changed files with 213 additions and 206 deletions
+6 -3
View File
@@ -20,7 +20,8 @@ package kotlin
* Annotates the parameter of a function annotated as [inline] and forbids inlining of
* function literals passed as arguments for this parameter.
*/
public annotation class noinline
target(AnnotationTarget.VALUE_PARAMETER)
public annotation(retention = AnnotationRetention.RUNTIME) class noinline
/**
* Enables inlining of the annotated function and the function literals that it takes as parameters into the
@@ -33,7 +34,8 @@ public annotation class noinline
* @see noinline
* @see inlineOptions
*/
public annotation class inline(public val strategy: InlineStrategy = InlineStrategy.AS_FUNCTION)
target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
public annotation(retention = AnnotationRetention.RUNTIME) class inline(public val strategy: InlineStrategy = InlineStrategy.AS_FUNCTION)
/**
* Specifies the strategy for code generation for an inline function.
@@ -61,7 +63,8 @@ public enum class InlineStrategy {
*
* @property value the inlining options selected for the annotated function parameter.
*/
public annotation class inlineOptions(vararg val value: InlineOption)
target(AnnotationTarget.VALUE_PARAMETER)
public annotation(retention = AnnotationRetention.RUNTIME) class inlineOptions(vararg val value: InlineOption)
/**
* Specifies the control flow statements which are allowed to be used for non-local control flow transfer in a lambda
@@ -18,5 +18,5 @@ package kotlin.jvm.internal
import java.lang.annotation.*
Retention(RetentionPolicy.RUNTIME)
public annotation class Intrinsic(val value: String)
target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
public annotation(retention = AnnotationRetention.RUNTIME) class Intrinsic(val value: String)