Deprecate inlineOption in favor of crossinline modifier
This commit is contained in:
@@ -50,8 +50,17 @@ public annotation class inline
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@MustBeDocumented
|
||||
@Deprecated("Use 'crossinline' modifier instead of 'inlineOptions(InlineOption.ONLY_LOCAL_RETURN)'")
|
||||
public annotation class inlineOptions(vararg val value: InlineOption)
|
||||
|
||||
/**
|
||||
* Forbids use of non-local control flow statements within lambdas passed as arguments for this parameter.
|
||||
*/
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@MustBeDocumented
|
||||
public annotation class crossinline
|
||||
|
||||
/**
|
||||
* Specifies the control flow statements which are allowed to be used for non-local control flow transfer in a lambda
|
||||
* passed as a parameter to an inline function.
|
||||
|
||||
@@ -180,6 +180,7 @@ public class KotlinBuiltIns {
|
||||
public final FqName tailRecursiveDeprecated = fqName("tailRecursive");
|
||||
public final FqName inline = fqName("inline");
|
||||
public final FqName noinline = fqName("noinline");
|
||||
public final FqName crossinline = fqName("crossinline");
|
||||
public final FqName inlineOptions = fqName("inlineOptions");
|
||||
public final FqName extension = fqName("Extension");
|
||||
public final FqName target = annotationName("Target");
|
||||
|
||||
@@ -20,4 +20,4 @@ import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
// Please synchronize this set with JetTokens.ANNOTATION_MODIFIERS_KEYWORDS_ARRAY
|
||||
public val ANNOTATION_MODIFIERS_FQ_NAMES: Set<FqName> =
|
||||
arrayOf("data", "inline", "noinline", "tailrec", "external", "annotation.annotation").map { FqName("kotlin.$it") }.toSet()
|
||||
arrayOf("data", "inline", "noinline", "tailrec", "external", "annotation.annotation", "crossinline").map { FqName("kotlin.$it") }.toSet()
|
||||
|
||||
Reference in New Issue
Block a user