-
Notifications
You must be signed in to change notification settings - Fork 26
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
Consider visibility modifier of @Lenses
annotated data classes
#773
Comments
This sounds totally valid, but in order to understand the necessity of this issue, can you provide some (real world) example or use case, where one needs some |
In a real world application there might be a project that is structured like this:
In the example above there might be some data classes that are internally used in the In order to be able to fully use them with If the entire class is marked as internal, all lenses generated for that class could be marked internal as well. Also, after some thinking about the matter, one could argue that only the |
Current state
Currently, when a data class has a visiblity modifier other than
public
, the generated lenses will leak their non-public receiver type. This causes the compilation to fail.Example:
Generated lens:
Suggestion
The data class's visibility modifier should be used in the generated lenses.
The text was updated successfully, but these errors were encountered: