``` val x: () -> Any? = @Repeated(5) { ...
# announcements
s
Copy code
val x: () -> Any? = @Repeated(5) {
            "hi"
        }

        // test if x has annontation
//fail       
        println(x::class.java.annotations.first() as Repeated)
l
I think there's a kotlin way to do it
s
x::class.java.getAnnotation(Repeated::class.java) gives a null
happy with java way just need to access it, presuming there is someway
l
I'm not sure how to do that in a lambda tho
Perhaps you can take a look on how it's compiled?
I mean, try to take a look at the bytecode, and see how the hell that class is created
Because it doesn't make sense for me for that to return null
Maybe just
x::class.findAnnotation<Repeated>()
?
s
I ended changing my design, i was just trying to hack this in without changing the type signatures etc