Add test for KT-51499 (occurs in FE10, already fixed in FIR)
This commit is contained in:
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
@file:OptIn(Marker::class)
|
||||
|
||||
@RequiresOptIn
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
annotation class Marker
|
||||
|
||||
@Marker
|
||||
fun experimental() {}
|
||||
|
||||
interface MyInterface {
|
||||
fun execute()
|
||||
}
|
||||
|
||||
class MyClass : MyInterface {
|
||||
override fun execute() = experimental()
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
@file:OptIn(Marker::class)
|
||||
|
||||
@RequiresOptIn
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
annotation class Marker
|
||||
|
||||
@Marker
|
||||
fun experimental() {}
|
||||
|
||||
interface MyInterface {
|
||||
fun execute()
|
||||
}
|
||||
|
||||
class MyClass : MyInterface {
|
||||
override fun execute() = <!OPT_IN_USAGE_ERROR!>experimental<!>()
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package
|
||||
|
||||
@Marker public fun experimental(): kotlin.Unit
|
||||
|
||||
@kotlin.RequiresOptIn @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION}) public final annotation class Marker : kotlin.Annotation {
|
||||
public constructor Marker()
|
||||
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 MyClass : MyInterface {
|
||||
public constructor MyClass()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun execute(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface MyInterface {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun execute(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user