Add test for KT-51499 (occurs in FE10, already fixed in FIR)

This commit is contained in:
Mikhail Glukhikh
2022-04-04 11:12:02 +03:00
committed by Space
parent 7ffb232a95
commit 899dc401c8
7 changed files with 81 additions and 0 deletions
@@ -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()
}
@@ -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<!>()
}
@@ -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
}