-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
MapProperty.Use: Default + non-default user mappings generate wrong (chained) mapping code #1254
Comments
Mapperly tries to map these types to compatible types. As this behaviour is already released in a stable version and may also be useful in some scenarios we cannot remove it completely anymore. I still understand your point. I think we should introduce a compile time warning whenever a |
@latonz Sounds reasonable. Users can then change the Analyzer Rule ID severity to |
🎉 This issue has been resolved in version 3.6.0-next.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 3.6.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Consider the following classes:
And the following mapper:
In
ToModelWrong
we want to convert adouble
toLength
, but we explicitly specify a mapping method that converts fromLength
todouble
(ToMeters
). Since we also have a default mapping method that convertsdouble
toLength
(FromMillimeters
), Mapperly generates the following mapping (double
->Length
,Length
->double
,double
->Length
):But this is obviously very wrong and unexpected. In this case I would expect an error from Mapperly because I explicitly specified a mapping method that has an incompatible signature.
The text was updated successfully, but these errors were encountered: