Is `Class` cross-platform? Because `KClass` doesn’...
# kotlin-native
m
Is
Class
cross-platform? Because
KClass
doesn’t seem to have a replacement for
isAssignableFrom()
.
s
KClass.isSubclassOf
/
KClass.isSuperclassOf
?
m
😦 I've relied on an outdated post on the web. Shame on me. Thanks for the info! Does that also work with interfaces? How does it handle primitive types and boxing?
s
Oh, sorry. Looks like,
KClass.isSubclassOf
/
KClass.isSuperclassOf
not implemented in kotlin native yet.
m
But at least it's there so it's likely to become implemented in the near future :)
p
m
Hmm, there’s no mention of checking sub/superclass relations of a
KClass
. Basically it’s a type-level
is
check, isn’t it? Not sure whether that already counts as reflection 🙂