Skip to content

Unions: Avoid invalid cast exception in erroneous code#82213

Merged
AlekseyTs merged 1 commit into
dotnet:features/Unionsfrom
AlekseyTs:Unions_13
Jan 30, 2026
Merged

Unions: Avoid invalid cast exception in erroneous code#82213
AlekseyTs merged 1 commit into
dotnet:features/Unionsfrom
AlekseyTs:Unions_13

Conversation

@AlekseyTs

Copy link
Copy Markdown
Contributor

No description provided.

@AlekseyTs AlekseyTs requested a review from a team January 29, 2026 23:03
@AlekseyTs

Copy link
Copy Markdown
Contributor Author

@333fred, @dotnet/roslyn-compiler For a second review

@jcouv jcouv left a comment

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.

LGTM Thanks (commit 1). Consider adding the repro test as well

@333fred 333fred left a comment

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 there a test for this?

@AlekseyTs

AlekseyTs commented Jan 29, 2026

Copy link
Copy Markdown
Contributor Author

Is there a test for this?

Not in this PR. The change is strait forward. This change is another one that must be shared with closed classes, and having a union test in the same commit might make the sharing more complicated.

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.

4 participants