Join Slack
Powered by
Is it possible to generically create an enum from ...
# stdlib
b
bbaldino
07/10/2020, 10:28 PM
Is it possible to generically create an enum from an instance of
KType
(of the enum) and a string (of the enum value) ?
bbaldino
07/10/2020, 10:28 PM
I know of
enumValueOf
, but that requires a
reified T
d
diesieben07
07/13/2020, 8:57 AM
There is an open issue about it with a known workaround here:
https://youtrack.jetbrains.com/issue/KT-14743
To go from
KType
to
KClass
use
classifier
➕ 1
3
Views
Open in Slack
Previous
Next