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

VB -> C#: Add brackets for null coalesce operator when needed #628

Merged
merged 3 commits into from
Sep 13, 2020
Merged

Conversation

SuperRembo
Copy link
Contributor

Fixes #626

Problem

In some cases the null coalesce operator is missing parenthesis, resulting in incorrect output.

Solution

  • The same mechanism is used as already exists for the ternary operator
  • Covered by test NullCoalescingOperatorUsesParenthesisWhenNeededAsync

@GrahamTheCoder GrahamTheCoder merged commit c0a07dd into icsharpcode:master Sep 13, 2020
@GrahamTheCoder
Copy link
Member

Looks great, thanks!

@SuperRembo SuperRembo deleted the 626 branch September 14, 2020 06:36
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.

VB -> C#: Null coalesce missing brackets
2 participants