Files
kotlin-fork/compiler/testData/codegen/boxWithStdlib/reflection/annotations/retentions.kt
T
Mikhail Glukhikh eab288bdd7 annotation() now has no arguments. Syntax migration to Retention / Repeatable / MustBeDocumented combination
Deprecated test for annotation(params) completion deleted. A lot of tests changed.
2015-09-04 19:21:12 +03:00

19 lines
412 B
Kotlin
Vendored

import kotlin.test.assertEquals
@Retention(AnnotationRetention.SOURCE)
annotation class SourceAnno
@Retention(AnnotationRetention.BINARY)
annotation class BinaryAnno
@Retention(AnnotationRetention.RUNTIME)
annotation class RuntimeAnno
@SourceAnno
@BinaryAnno
@RuntimeAnno
fun box(): String {
assertEquals(listOf(javaClass<RuntimeAnno>()), ::box.annotations.map { it.annotationType() })
return "OK"
}