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
When inlining this method into a projection method, Mapperly correctly generates the necessary global alias for DateTime.MinValue, new DateTimeOffset and DateTime.SpecifyKind but not for DateTimeKind.Utc causing a CS0103 error.
It works when using global::System.DateTimeKind.Utc in the mapping method itself:
Please do the checklist before filing an issue:
Describe the bug
I created a custom mapping method with the following code:
When inlining this method into a projection method, Mapperly correctly generates the necessary
global
alias forDateTime.MinValue
,new DateTimeOffset
andDateTime.SpecifyKind
but not forDateTimeKind.Utc
causing aCS0103
error.It works when using
global::System.DateTimeKind.Utc
in the mapping method itself:Declaration code
Actual relevant generated code
Expected relevant generated code
Notice the change from
DateTimeKind.Utc
toglobal::System.DateTimeKind.Utc
on line 10.Reported relevant diagnostics
The name 'DateTimeKind' does not exist in the current context
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: