um, so I just went to write my first annotation in...
# announcements
g
um, so I just went to write my first annotation in kotlin and i cant figure out whats going on with annotation `KClass`arguments.
Copy code
annotation class Thingy(val type: KClass<*>)

    @Test fun `when using annotation class should work properly`(){

        val thingies = AnnotatedThingy::class.annotations.filterIsInstance<Thingy>()

        assertThat(thingies.single().type).isNotEqualTo(Int::class).isEqualTo(Int::class.java)
    }

    @Thingy(Int::class)
    class AnnotatedThingy(val x: Int)
does anyone know why
type
is a
java.lang.Class
instead of a
KClass
?