You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After update to version 3.4.0 from 3.3.0 Mapperly started to generate non-compilable code.
In this example i have two classes with identical property MyDictionary. The problem lays in signature of generated MapToIDictionary method. It used to accept List as dictionary value parameter but it changed to IReadonlyCollection.
Thanks for reporting this, it definitely looks like a bug! We should never generalise the type arguments.
latonz
changed the title
Invalid mappings generated for nullable IDictionary value
Dictionary value type parameter generalisation leads to unassignable types
Mar 8, 2024
Describe the bug
After update to version 3.4.0 from 3.3.0 Mapperly started to generate non-compilable code.
In this example i have two classes with identical property
MyDictionary
. The problem lays in signature of generated MapToIDictionary method. It used to accept List as dictionary value parameter but it changed to IReadonlyCollection.Declaration code
Actual generated code
Expected generated code (This was generated in version 3.3.)
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: