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
I can reproduce the bug using the latest prerelease version
I have searched existing discussion and issue to avoid duplicates
Describe the bug
A base abstract generic class declares an abstract method that is supposed to be partial in the derived class.
There are some properties of the generic type that should be ignored when mapping.
I declared them as such, but I still see RMG012.
It seems that override partial does not inherit the attribute.
According to Microsoft documentation the derived method should inherit the attributes. MS docs
Source generators operate at the syntax or semantic model level, which means they don't automatically recognize inherited attributes. Is what you're trying to achieve a common configuration for a base type?
Source generators operate at the syntax or semantic model level, which means they don't automatically recognize inherited attributes. Is what you're trying to achieve a common configuration for a base type?
For this yes, since in our scenario there are a number of base properties that have to be mapped manually.
So it is easier to enforce derived mappers to override the mapping of a concrete class than to call that common code all over the place.
The mapper works fine, it's just that these warnings confuse us and can hide an actual missing property.
#513 could help your use case. Other than that there is currently no support for this scenario. I added the enhancement label. Feel free to contribute 😉
Please do the checklist before filing an issue:
Describe the bug
A base abstract generic class declares an abstract method that is supposed to be
partial
in the derived class.There are some properties of the generic type that should be ignored when mapping.
I declared them as such, but I still see RMG012.
It seems that
override partial
does not inherit the attribute.According to Microsoft documentation the derived method should inherit the attributes.
MS docs
Declaration code
Reported relevant diagnostics
Environment (please complete the following information):
#error version
in any.cs
file]The text was updated successfully, but these errors were encountered: