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

Null-coalescing in friendly overload #848

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Null-coalescing in friendly overload #848

merged 1 commit into from
Jan 20, 2023

Conversation

davidegiacometti
Copy link
Contributor

Fixes #277
Use null-coalescing in friendly overload.
Generate x ?? default(TYPE) instead of x.HasValue ? x.Value : default(TYPE).

Copy link
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it. Thanks.

@AArnott AArnott merged commit 852e176 into microsoft:main Jan 20, 2023
@davidegiacometti davidegiacometti deleted the issue-277 branch January 20, 2023 17:03
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.

Codegen for nullable structs in friendly overloads could be optimized
2 participants