Skip to content
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

Correct nullable support #5

Closed
CommonGuy opened this issue Feb 14, 2022 · 0 comments · Fixed by #16
Closed

Correct nullable support #5

CommonGuy opened this issue Feb 14, 2022 · 0 comments · Fixed by #16
Labels

Comments

@CommonGuy
Copy link
Contributor

CommonGuy commented Feb 14, 2022

The generated code isn't correct. It looks like this

#nullable enable

public sealed class Mapper : IMapper
{
    public CarDto MapToDto(Car source)
    {
        if (source == null)
            return default;
            
        // ...
    }
}

The mapping method returns null, even though the return type isn't nullable.

@CommonGuy CommonGuy added the bug Something isn't working label Feb 14, 2022
@latonz latonz linked a pull request Feb 17, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants