e7e80be34a
Before this commit we considered !isOverride as a sign that function / field / accessor has no overridden symbols. However, it's false for deserialized, because isOverride is always false there. This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
19 lines
526 B
Kotlin
Vendored
19 lines
526 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
|
|
// WITH_RUNTIME
|
|
|
|
annotation class Ann(val v: String = "???")
|
|
@Ann open class My
|
|
fun box(): String {
|
|
val v = @Ann("OK") object: My() {}
|
|
val klass = v.javaClass
|
|
|
|
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"
|
|
|
|
return annotation.v
|
|
}
|