-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any suggested way to forbid calls to toString
on EnumEntry
ies?
#344
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.toString
on case objects is generated by Scala compiler, not overridden by Enumeratum... so when aentryName
-mangling mixin likeUpperSnakecase
is involved,.toString
and.entryName
return different things. To avoid bugs (esp. in the data returned via API), I've added a piece of ArchUnit like that:But I've just realized this doesn't work, as
toString
is always recognized to be owned byjava.lang.Object
.Is there suggested way to deal with this problem? I can't see anything below a scalac plugin could handle that properly TBH 🤔
The text was updated successfully, but these errors were encountered: