mercredi 27 mars 2019

kotlin.reflect.KClass.isInstance(value: Any?) not working

I'm trying the follow

"simple string"::class.isInstance(kotlin.String)

But it return false!

I'm using

"org.jetbrains.kotlin:kotlin-reflect:1.3.21"

The another examples also fail

1::class.isInstance(kotlin.Int)
true::class.isInstance(Boolean)

Please, help me to understand it!





Aucun commentaire:

Enregistrer un commentaire