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

Missing return statement for disabled directives #78

Closed
maca88 opened this issue Jan 3, 2018 · 0 comments
Closed

Missing return statement for disabled directives #78

maca88 opened this issue Jan 3, 2018 · 0 comments
Labels
Milestone

Comments

@maca88
Copy link
Owner

maca88 commented Jan 3, 2018

Example:
Supposing that TEST directive is not set

public void Test()
{
#if TEST
  SimpleFile.Read();
#else
  SimpleFile.Read();
#endif
}

Expected:

public Task TestAsync()
{
#if TEST
  SimpleFile.Read();
  return Task.Completed;
#else
  return SimpleFile.ReadAsync();
#endif
}

Actual:

public Task TestAsync()
{
#if TEST
  SimpleFile.Read();
#else
  return SimpleFile.ReadAsync();
#endif
}
@maca88 maca88 added the bug label Jan 3, 2018
@maca88 maca88 changed the title Invalid generated code for disabled directives Missing return statement for disabled directives Jan 7, 2018
@maca88 maca88 closed this as completed in 2386089 Jan 7, 2018
@maca88 maca88 added this to the 0.8.1 milestone Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant