Closed RichardD2 closed 4 weeks ago
Thanks for reporting. I cannot reproduce the RMG066, I always get RMG020 for Value
and HasValue
of the bool?
(which isn't optimal either). Do you have any properties set on the MapperAttribute
or do you have a MapperDefaultsAttribute
for your assembly?
No additional settings. I'm getting the two RMG020
hints and the RMG066
warning with just the code shown.
I've attached the sample project I'm using: Mapperly1402.zip
Describe the bug Creating a mapping between two entities, both of which contain the same read-only computed property of a nullable value type, produces an erroneous
RMG066
warning.Declaration code
Actual relevant generated code
Expected relevant generated code The actual generated code is correct. However, the mapping is flagged with:
Environment (please complete the following information):
Additional context Explicitly adding a
MapperIgnoreSource
for the computed property makes the warning go away: