Make EXPERIMENTAL_ANNOTATION_ON_OVERRIDE warning till 1.6

This commit is contained in:
Mikhail Glukhikh
2021-07-26 12:22:23 +03:00
parent bb38eaae61
commit 810def829c
18 changed files with 112 additions and 8 deletions
@@ -0,0 +1,12 @@
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
// !LANGUAGE: -OptInOnOverrideForbidden
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
@Retention(AnnotationRetention.BINARY)
annotation class E
class My {
@E
override fun hashCode() = 0
}
@@ -0,0 +1,12 @@
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
// !LANGUAGE: -OptInOnOverrideForbidden
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
@Retention(AnnotationRetention.BINARY)
annotation class E
class My {
<!EXPERIMENTAL_ANNOTATION_ON_OVERRIDE_WARNING!>@E<!>
override fun hashCode() = 0
}
@@ -0,0 +1,15 @@
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,4 +1,5 @@
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
// !LANGUAGE: +OptInOnOverrideForbidden
// FILE: api.kt
package api
@@ -1,4 +1,5 @@
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
// !LANGUAGE: +OptInOnOverrideForbidden
// FILE: api.kt
package api