Files
kotlin-fork/compiler/testData/codegen/box/annotations/instances/annotationFromStdlib.kt
T
2021-09-23 06:59:34 +00:00

17 lines
523 B
Kotlin
Vendored

// 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"
}