Enum.valueOf in Kotlin

Your function works if you specify the type parameter value explicitly:

val value = safeValueOf<TestEnum>("test")

The original code is supposed to work as well, but doesn’t work because of a bug in the type inference implementation: https://youtrack.jetbrains.com/issue/KT-11218

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)