Skip to content

Commit

Permalink
Remove @ExperimentalSubclassOptIn from SubclassOptInRequired
Browse files Browse the repository at this point in the history
Tests are updated.

^KT-71222 Fixed
  • Loading branch information
BlondeHex authored and qodana-bot committed Sep 20, 2024
1 parent f414e45 commit d6a78dd
Show file tree
Hide file tree
Showing 26 changed files with 27 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3842,7 +3842,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] kotlin.kotlin_builtins
}

}
@R|kotlin/annotation/Target|[Types]() @R|kotlin/annotation/Retention|[Types]() @R|kotlin/SinceKotlin|[Types]() @R|kotlin/ExperimentalSubclassOptIn|[Types]() public final [ResolvedTo(BODY_RESOLVE)] annotation class SubclassOptInRequired : R|kotlin/Annotation|, R|kotlin/Annotation| {
@R|kotlin/annotation/Target|[Types]() @R|kotlin/annotation/Retention|[Types]() @R|kotlin/SinceKotlin|[Types]() @R|kotlin/WasExperimental|[Types]() public final [ResolvedTo(BODY_RESOLVE)] annotation class SubclassOptInRequired : R|kotlin/Annotation|, R|kotlin/Annotation| {
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=SubclassOptInRequired] constructor([ResolvedTo(BODY_RESOLVE)] markerClass: R|kotlin/reflect/KClass<out kotlin/Annotation>|): R|kotlin/SubclassOptInRequired| {
super<R|kotlin/Any|>()
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/fir/analysis-tests/testData/builtIns/kotlin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ public final class String : R|kotlin/Comparable<kotlin/String>|, R|kotlin/CharSe

}

@R|kotlin/annotation/Target|(allowedTargets = <implicitArrayOf>(kotlin/annotation/AnnotationTarget.CLASS)) @R|kotlin/annotation/Retention|(value = kotlin/annotation/AnnotationRetention.BINARY) @R|kotlin/SinceKotlin|(version = String(1.8)) @R|kotlin/ExperimentalSubclassOptIn|() public final annotation class SubclassOptInRequired : R|kotlin/Annotation| {
@R|kotlin/annotation/Target|(allowedTargets = <implicitArrayOf>(kotlin/annotation/AnnotationTarget.CLASS)) @R|kotlin/annotation/Retention|(value = kotlin/annotation/AnnotationRetention.BINARY) @R|kotlin/SinceKotlin|(version = String(2.1)) @R|kotlin/WasExperimental|(markerClass = <implicitArrayOf>(<getClass>(<getClass>(R|kotlin/ExperimentalSubclassOptIn|)))) public final annotation class SubclassOptInRequired : R|kotlin/Annotation| {
public final val markerClass: R|kotlin/reflect/KClass<out kotlin/Annotation>|
public get(): R|kotlin/reflect/KClass<out kotlin/Annotation>|

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FILE: ClassIdDiagnosticRendering.kt
@FILE:R|kotlin/OptIn|(markerClass = vararg(<getClass>(Q|kotlin/ExperimentalSubclassOptIn|)))
package a.b.c

@R|kotlin/RequiresOptIn|() public final annotation class Marker : R|kotlin/Annotation| {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// WITH_EXTRA_CHECKERS
@file:OptIn(ExperimentalSubclassOptIn::class)

package a.b.c

Expand Down
2 changes: 1 addition & 1 deletion compiler/testData/builtin-classes/default/kotlin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ public final class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequenc
}
}

@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) @kotlin.annotation.Retention(value = AnnotationRetention.BINARY) @kotlin.SinceKotlin(version = "1.8") @kotlin.ExperimentalSubclassOptIn public final annotation class SubclassOptInRequired : kotlin.Annotation {
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) @kotlin.annotation.Retention(value = AnnotationRetention.BINARY) @kotlin.SinceKotlin(version = "2.1") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalSubclassOptIn::class}) public final annotation class SubclassOptInRequired : kotlin.Annotation {
/*primary*/ public constructor SubclassOptInRequired(/*0*/ markerClass: kotlin.reflect.KClass<out kotlin.Annotation>)
public final val markerClass: kotlin.reflect.KClass<out kotlin.Annotation>
public final fun `<get-markerClass>`(): kotlin.reflect.KClass<out kotlin.Annotation>
Expand Down
2 changes: 1 addition & 1 deletion compiler/testData/builtin-classes/java8/kotlin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ public final class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequenc
}
}

@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) @kotlin.annotation.Retention(value = AnnotationRetention.BINARY) @kotlin.SinceKotlin(version = "1.8") @kotlin.ExperimentalSubclassOptIn public final annotation class SubclassOptInRequired : kotlin.Annotation {
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) @kotlin.annotation.Retention(value = AnnotationRetention.BINARY) @kotlin.SinceKotlin(version = "2.1") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalSubclassOptIn::class}) public final annotation class SubclassOptInRequired : kotlin.Annotation {
/*primary*/ public constructor SubclassOptInRequired(/*0*/ markerClass: kotlin.reflect.KClass<out kotlin.Annotation>)
public final val markerClass: kotlin.reflect.KClass<out kotlin.Annotation>
public final fun `<get-markerClass>`(): kotlin.reflect.KClass<out kotlin.Annotation>
Expand Down
2 changes: 1 addition & 1 deletion compiler/testData/builtin-classes/newMethods/kotlin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ public final class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequenc
}
}

@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) @kotlin.annotation.Retention(value = AnnotationRetention.BINARY) @kotlin.SinceKotlin(version = "1.8") @kotlin.ExperimentalSubclassOptIn public final annotation class SubclassOptInRequired : kotlin.Annotation {
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS}) @kotlin.annotation.Retention(value = AnnotationRetention.BINARY) @kotlin.SinceKotlin(version = "2.1") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalSubclassOptIn::class}) public final annotation class SubclassOptInRequired : kotlin.Annotation {
/*primary*/ public constructor SubclassOptInRequired(/*0*/ markerClass: kotlin.reflect.KClass<out kotlin.Annotation>)
public final val markerClass: kotlin.reflect.KClass<out kotlin.Annotation>
public final fun `<get-markerClass>`(): kotlin.reflect.KClass<out kotlin.Annotation>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class ApiMarker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@file:OptIn(ExperimentalSubclassOptIn::class)
@RequiresOptIn
annotation class ApiMarker

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@file:OptIn(ExperimentalSubclassOptIn::class)
@RequiresOptIn
annotation class ApiMarker

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// ALLOW_DANGEROUS_LANGUAGE_VERSION_TESTING
// LANGUAGE_VERSION: 2.0
// API_VERSION: 2.0

@RequiresOptIn
annotation class ApiMarker

@<!OPT_IN_USAGE_ERROR!>SubclassOptInRequired<!>(ApiMarker::class)
open class OpenKlassA

@OptIn(ExperimentalSubclassOptIn::class)
@SubclassOptInRequired(ApiMarker::class)
open class OpenKlassB
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// FIR_IDENTICAL
// ALLOW_DANGEROUS_LANGUAGE_VERSION_TESTING
// LANGUAGE_VERSION: 2.0
// API_VERSION: 2.0

@RequiresOptIn
annotation class ApiMarker

@<!OPT_IN_USAGE_ERROR!>SubclassOptInRequired<!>(ApiMarker::class)
open class OpenKlass
@<!DEBUG_INFO_UNRESOLVED_WITH_TARGET, OPT_IN_USAGE_ERROR, UNRESOLVED_REFERENCE!>SubclassOptInRequired<!>(ApiMarker::class)
open class OpenKlassA

@OptIn(ExperimentalSubclassOptIn::class)
@SubclassOptInRequired(ApiMarker::class)
open class OpenKlassB
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class ApiMarker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class ApiMarker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class ApiMarker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class Api
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class Boom
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// FIR_IDENTICAL
// MODULE: a
@file:OptIn(ExperimentalSubclassOptIn::class)
package a

@RequiresOptIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class Boom
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@file:OptIn(ExperimentalSubclassOptIn::class)

annotation class DummyAnnotation

<!SUBCLASS_OPT_ARGUMENT_IS_NOT_MARKER!>@SubclassOptInRequired(DummyAnnotation::class)<!>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@file:OptIn(ExperimentalSubclassOptIn::class)

annotation class DummyAnnotation

<!OPT_IN_ARGUMENT_IS_NOT_MARKER!>@SubclassOptInRequired(DummyAnnotation::class)<!>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class ApiMarker

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class ApiMarker

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class ApiMarker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class ApiMarker

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(ExperimentalSubclassOptIn::class)

@RequiresOptIn
annotation class ApiMarker

Expand Down

0 comments on commit d6a78dd

Please sign in to comment.