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

Fix: C# Code Generation generates method with return default(void) #4826

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nzeemin
Copy link

@nzeemin nzeemin commented Mar 19, 2024

This PR is made to avoid generation of C# code like this one (which leads to compilation error of course):

                        if (status_ == 204)
                        {
                            return default(void);
                        }

See also issues #3912, #3996.

@fairking
Copy link

fairking commented Aug 6, 2024

The example bellow:

if (status_ == 204)
{
    return default(void);
}

should be

if (status_ == 204)
{
    return; // or return default;
}

But the question is what should we do with 200? I assume having "no result or default" is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants