Skip to content

Support union matching for values of Nullable<Union>#82558

Merged
AlekseyTs merged 3 commits into
dotnet:features/Unionsfrom
AlekseyTs:Unions_22
Mar 3, 2026
Merged

Support union matching for values of Nullable<Union>#82558
AlekseyTs merged 3 commits into
dotnet:features/Unionsfrom
AlekseyTs:Unions_22

Conversation

@AlekseyTs

Copy link
Copy Markdown
Contributor

No description provided.

@AlekseyTs

Copy link
Copy Markdown
Contributor Author

@RikkiGibson, @333fred, @dotnet/roslyn-compiler Please review

Comment thread src/Compilers/CSharp/Portable/Binder/Binder_Operators.cs Outdated
Comment thread src/Compilers/CSharp/Portable/Binder/Binder_Patterns.cs Outdated
@AlekseyTs AlekseyTs requested a review from a team February 27, 2026 23:37
@AlekseyTs

Copy link
Copy Markdown
Contributor Author

@RikkiGibson, @dotnet/roslyn-compiler For a second review

2 similar comments
@AlekseyTs

Copy link
Copy Markdown
Contributor Author

@RikkiGibson, @dotnet/roslyn-compiler For a second review

@AlekseyTs

Copy link
Copy Markdown
Contributor Author

@RikkiGibson, @dotnet/roslyn-compiler For a second review

Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
RefKind: RefKind.None,
Parameters: [{ RefKind: RefKind.Out, Type: var parameterType }]
Parameters: [{ RefKind: RefKind.Out, Type: var parameterType }],
ContainingType: { IsUnionType: true } unionType

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is moving this check to here changing any behavior? Same question for the pattern in isUnionTryGetValueValue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is moving this check to here changing any behavior? Same question for the pattern in isUnionTryGetValueValue.

No, the refactoring was suggested by @333fred in one of the previous PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants