[K/N] Implement instantiating of annotation class

This commit is contained in:
Pavel Kunyavskiy
2021-09-21 16:12:53 +03:00
committed by Space
parent a40022efcd
commit fb875c484d
33 changed files with 260 additions and 123 deletions
@@ -0,0 +1,17 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND: WASM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_RUNTIME
// !LANGUAGE: +InstantiationOfAnnotationClasses
import kotlin.reflect.KClass
fun box(): String {
val ann1 = kotlin.SinceKotlin("1.6.0")
val expectedToString = "@kotlin.SinceKotlin(version=1.6.0)"
val actualToString = ann1.toString()
if (actualToString != expectedToString) return "Expected ann1.toString() equals to $expectedToString, but it's $actualToString"
return "OK"
}