enumeratum
enumeratum copied to clipboard
Better error message for withName
Currently withName produces error messages like
Baz is not a member of Enum (Bar, Boo)
where Enum is used regardless of the actual enum class/trait name. Is it possible to replace it with the actual class name?
That's a good idea. The implementation could be tricky to get right though, because there are weird edge cases that make it hard to get a nice short name (e.g. if an object is declared inside a method), and getSimpleName is known to throw in some situations.