groostav
01/16/2017, 11:26 PMannotation 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
?