https://kotlinlang.org logo
Title
d

dead.fish

03/23/2018, 8:23 AM
and
it::class.isInstance(value.type)
apparently needs
kotlin-reflect
, which I don't want to draw in just for that purpose
...which is a pity, because the plain
is
operator obviously doesn't need
kotlin-reflect
either to work
but I guess this is compile-time magic
e

Evgeniy Zaharov

03/23/2018, 8:26 AM
@dead.fish
it::class.isInstance(value)
doesn’t need reflection
d

dead.fish

03/23/2018, 8:27 AM
But it tells me so:

https://puu.sh/zNKkW/429849655a.png

e

Evgeniy Zaharov

03/23/2018, 8:27 AM
try without
type
in argument
d

dead.fish

03/23/2018, 8:28 AM
well, that type is the instance of the thing I want to check 🙂
e

Evgeniy Zaharov

03/23/2018, 8:30 AM
-