Fix IllegalAccessException on private annotation in reflection
#KT-14094 Fixed
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// WITH_REFLECT
|
||||
|
||||
annotation private class Ann(val name: String)
|
||||
|
||||
class A {
|
||||
@Ann("OK")
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val ann = A::class.members.single { it.name == "foo" }.annotations.single() as Ann
|
||||
return ann.name
|
||||
}
|
||||
Reference in New Issue
Block a user