Fix test data after removing old annotation classes

This commit is contained in:
Alexander Udalov
2016-02-07 09:57:04 +05:30
parent 938a435346
commit 9f786c00a7
4 changed files with 4 additions and 16 deletions
@@ -4,12 +4,11 @@ fun box(): String {
val v = @Ann("OK") object: My() {}
val klass = v.javaClass
val annotations = klass.annotations
// Ann, kotlin.Metadata, kotlin.jvm.internal.KotlinClass
if (annotations.size != 3) return "Fail annotations size is ${annotations.size}: ${annotations.toList()}"
val annotations = klass.annotations.toList()
// Ann, kotlin.Metadata
if (annotations.size != 2) return "Fail annotations size is ${annotations.size}: $annotations"
val annotation = annotations.filterIsInstance<Ann>().firstOrNull()
?: return "Fail no @Ann: ${annotations.toList()}"
?: return "Fail no @Ann: $annotations"
return annotation.v
}