https://kotlinlang.org logo
#kontributors
Title
# kontributors
m

marcinmoskala

08/19/2017, 12:29 PM
I have a problem with getting getter annotation from property reference. Here is annotation:
Copy code
class A {
    @get:Arg val a: Int by BoundToValueDelegateProvider()
}
Inside
provideDelegate
I have property reference
Copy code
operator fun provideDelegate(
        thisRef: Any?,
        prop: KProperty<*>
): ReadWriteProperty<Any, T> {
    val annotation1 = prop.getter.findAnnotation<Arg>() // This is null
    val annotation2 = prop.javaGetter?.getAnnotation(Arg::class.java) // This is null too
    // ...
}
It this bug or expected behavior?
k

kirillrakhman

08/19/2017, 1:44 PM
are you sure this is #kontributors related?
m

marcinmoskala

08/20/2017, 6:50 AM
I added it here because it looks like bug
Where would you add it?
k

kirillrakhman

08/20/2017, 3:20 PM
You can ask about bugs in every channel, #general or in this case maybe #reflect
3 Views