Skip to content

Commit df10e9e

Browse files
BlondeHexSpace Team
authored and
Space Team
committed
Make @SubclassOptInRequired accept multiple experimental markers
[2/5] Update SubclassOptInRequired argument type Previously, @SubclassOptInRequired could not accept multiple experimental markers and did not allow repeating the annotation. This change allows the marker to be passed as a vararg. ^KT-70562 in progress
1 parent 2d0815c commit df10e9e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

libraries/stdlib/src/kotlin/annotations/OptIn.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,5 @@ public annotation class ExperimentalSubclassOptIn
178178
@SinceKotlin("2.1")
179179
@WasExperimental(ExperimentalSubclassOptIn::class)
180180
public annotation class SubclassOptInRequired(
181-
val markerClass: KClass<out Annotation>
181+
vararg val markerClass: KClass<out Annotation>,
182182
)

libraries/tools/binary-compatibility-validator/klib-public-api/kotlin-stdlib.api

+2-2
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,10 @@ open annotation class kotlin/SinceKotlin : kotlin/Annotation { // kotlin/SinceKo
283283
}
284284

285285
open annotation class kotlin/SubclassOptInRequired : kotlin/Annotation { // kotlin/SubclassOptInRequired|null[0]
286-
constructor <init>(kotlin.reflect/KClass<out kotlin/Annotation>) // kotlin/SubclassOptInRequired.<init>|<init>(kotlin.reflect.KClass<out|kotlin.Annotation>){}[0]
286+
constructor <init>(kotlin/Array<out kotlin.reflect/KClass<out kotlin/Annotation>>...) // kotlin/SubclassOptInRequired.<init>|<init>(kotlin.Array<out|kotlin.reflect.KClass<out|kotlin.Annotation>>...){}[0]
287287

288288
final val markerClass // kotlin/SubclassOptInRequired.markerClass|{}markerClass[0]
289-
final fun <get-markerClass>(): kotlin.reflect/KClass<out kotlin/Annotation> // kotlin/SubclassOptInRequired.markerClass.<get-markerClass>|<get-markerClass>(){}[0]
289+
final fun <get-markerClass>(): kotlin/Array<out kotlin.reflect/KClass<out kotlin/Annotation>> // kotlin/SubclassOptInRequired.markerClass.<get-markerClass>|<get-markerClass>(){}[0]
290290
}
291291

292292
open annotation class kotlin/Suppress : kotlin/Annotation { // kotlin/Suppress|null[0]

libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public abstract interface annotation class kotlin/SinceKotlin : java/lang/annota
237237
}
238238

239239
public abstract interface annotation class kotlin/SubclassOptInRequired : java/lang/annotation/Annotation {
240-
public abstract fun markerClass ()Ljava/lang/Class;
240+
public abstract fun markerClass ()[Ljava/lang/Class;
241241
}
242242

243243
public abstract interface annotation class kotlin/Suppress : java/lang/annotation/Annotation {

0 commit comments

Comments
 (0)