Add @SinceKotlin and KDoc for ContextFunctionTypeParams

Initially, it was added accidentally as part of e3f987459c
and missed all out processes.

Adding @SinceKotlin("1.7") after the annotation has already been
published before is not really a problem, because it only may be used
with an experimental `-Xcontext-receivers` flag, thus it doesn't have
to be a part of our regular backward compatibility routine.

^KT-55226 Fixed
This commit is contained in:
Denis.Zharkov
2023-01-10 16:51:47 +01:00
committed by Space Team
parent 4a2a77d9b9
commit b009ee3744
8 changed files with 22 additions and 8 deletions
+13 -1
View File
@@ -97,8 +97,20 @@ public enum class DeprecationLevel {
@MustBeDocumented
public annotation class ExtensionFunctionType
/**
* Signifies that the annotated functional type has the prefix of size `count` for context receivers.
* Thus, `@ContextFunctionTypeParams(2) @ExtensionFunctionType Function4<String, Int, Double, Byte, Unit>` is a normalized representation of
* `context(String, Int) Double.(Byte) -> Unit`.
*
* Just the same as @ExtensionFunctionType, this annotation is not assumed to be used in source code, preferring the explicit function type
* syntax, like in the example above.
*
* There's no need in any additional opt-in limitations because this annotation might only be referenced by users
* who turned on an experimental `-Xcontext-receivers` compiler flag, for which there are no backward/forward compatibilities guarantees.
*/
@Target(TYPE)
@MustBeDocumented
@SinceKotlin("1.7")
public annotation class ContextFunctionTypeParams(val count: Int)
/**
@@ -174,4 +186,4 @@ public annotation class DslMarker
@Retention(AnnotationRetention.BINARY)
@MustBeDocumented
@SinceKotlin("1.1")
public annotation class PublishedApi
public annotation class PublishedApi