Skip to content

Allow ref structs for generic ThrowHelper interfaces#1161

Open
Avid29 wants to merge 1 commit intoCommunityToolkit:mainfrom
Avid29:allow-ref-structs
Open

Allow ref structs for generic ThrowHelper interfaces#1161
Avid29 wants to merge 1 commit intoCommunityToolkit:mainfrom
Avid29:allow-ref-structs

Conversation

@Avid29
Copy link
Contributor

@Avid29 Avid29 commented Feb 7, 2026

Closes #1127

Adds where T : allows ref struct anti-constraint to all generic ThrowHelper methods

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • Tested code with current supported SDKs
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes
  • Code follows all style conventions

Other information

Technically does nothing at the moment, since this code requires net9 and C# 13, which the library does not target.

Change will take a effect when the target is updated to net9 or greater

@Avid29 Avid29 force-pushed the allow-ref-structs branch from 3bb766b to 3f96417 Compare February 7, 2026 00:51
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.

Allow ref struct on Generic ThrowHelper methods

1 participant