Is it possible to know if a type is a sealed class...
# reflect
j
Is it possible to know if a type is a sealed class from a
KType
? I've created a sample of what I'm trying to do: https://pl.kotl.in/zBHj3IlEi
d
val isSealed = (returnType.classifier as? KClass<*>)?.isSealed ?: false
🎉 2
j
Thanks 🙂