Revert "Revert "Instantiation of annotations for JVM IR with the corresponding feature flag""

Fix incorrectly rebased ce0a3a57df

This reverts commit 3d0126d5
This commit is contained in:
Leonid Startsev
2021-07-21 18:22:29 +03:00
parent 54b9ad6bf5
commit 83c1a75c1e
60 changed files with 1593 additions and 64 deletions
@@ -0,0 +1,19 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
// WITH_RUNTIME
// SKIP_TXT
// !LANGUAGE: +InstantiationOfAnnotationClasses
import kotlin.reflect.KClass
annotation class A
annotation class B(val int: Int)
annotation class C(val int: Int = 42)
annotation class G<T: Any>(val int: KClass<T>)
fun box() {
val a = <!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>A()<!>
val b = <!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>B(4)<!>
val c = <!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>C()<!>
val foo = <!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>G(Int::class)<!>
}