Skip to content

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