Revert OPT_IN_MARKER_ON_OVERRIDE limitation #KT-48890 Fixed

This commit is contained in:
Mikhail Glukhikh
2022-01-26 13:29:30 +03:00
committed by Space
parent 0c49ae04cb
commit c2f43dd98e
10 changed files with 2 additions and 94 deletions
@@ -1,13 +0,0 @@
// FIR_IDENTICAL
// !OPT_IN: kotlin.RequiresOptIn
// !LANGUAGE: -OptInOnOverrideForbidden
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
@Retention(AnnotationRetention.BINARY)
annotation class E
class My {
<!OPT_IN_MARKER_ON_OVERRIDE_WARNING!>@E<!>
override fun hashCode() = 0
}
@@ -1,15 +0,0 @@
package
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Retention(value = AnnotationRetention.BINARY) public final annotation class E : kotlin.Annotation {
public constructor E()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public final class My {
public constructor My()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
@E public open override /*1*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -1,6 +1,5 @@
// FIR_IDENTICAL
// !OPT_IN: kotlin.RequiresOptIn
// !LANGUAGE: +OptInOnOverrideForbidden
// FILE: api.kt
package api
@@ -57,7 +56,7 @@ var some: Int
val another: Int = 42
class My {
<!OPT_IN_MARKER_ON_OVERRIDE!>@E6<!>
@E6
override fun hashCode() = 0
}
@@ -73,7 +72,7 @@ interface Base {
}
class Derived : Base {
<!OPT_IN_MARKER_ON_OVERRIDE!>@E6<!>
@E6
override val bar: Int = 42
@set:E6 <!OPT_IN_MARKER_ON_WRONG_TARGET!>@setparam:E6<!>