Skip to content

Fall out from #36502 #36550

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

Merged
merged 2 commits into from
Aug 15, 2025
Merged

Fall out from #36502 #36550

merged 2 commits into from
Aug 15, 2025

Conversation

cincuranet
Copy link
Contributor

No description provided.

@cincuranet cincuranet force-pushed the optional2 branch 2 times, most recently from 42b6a82 to 6c7feaa Compare August 13, 2025 17:13
@cincuranet cincuranet marked this pull request as ready for review August 13, 2025 19:15
@cincuranet cincuranet requested a review from a team as a code owner August 13, 2025 19:15
@cincuranet cincuranet requested a review from roji August 13, 2025 19:15
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM modulo some nits!

@cincuranet cincuranet force-pushed the optional2 branch 6 times, most recently from 96611a5 to 79c139b Compare August 14, 2025 19:44
@cincuranet cincuranet enabled auto-merge (squash) August 14, 2025 19:45
@cincuranet cincuranet force-pushed the optional2 branch 5 times, most recently from e273964 to a85a356 Compare August 14, 2025 20:24
@cincuranet cincuranet disabled auto-merge August 15, 2025 05:46
@cincuranet cincuranet merged commit 38fbaf9 into dotnet:main Aug 15, 2025
7 checks passed
@cincuranet cincuranet deleted the optional2 branch August 15, 2025 06:26

/// <inheritdoc />
public override StructuralTypeShaperExpression MakeClrTypeNullable()
=> Type != Type.MakeNullable()
Copy link
Member

Choose a reason for hiding this comment

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

I know you're just following the common pattern here (that's good), but I've never understood why the inverse conditional logic, i.e. why not do:

=> Type == Type.MakeNullable()
    ? this
    : new RelationalStructuralTypeShaperExpression(StructuralType, ValueBufferExpression, IsNullable, MaterializationCondition, Type.MakeNullable());

One day I'll do a pass...

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