Skip to content

net8 support with nullability analysis#199

Open
andrewimcclement wants to merge 3 commits intomcintyre321:masterfrom
andrewimcclement:aim/net8-support-with-nullability-analysis
Open

net8 support with nullability analysis#199
andrewimcclement wants to merge 3 commits intomcintyre321:masterfrom
andrewimcclement:aim/net8-support-with-nullability-analysis

Conversation

@andrewimcclement
Copy link
Copy Markdown

Resolves #198

}





public bool TryPickT0(out T0 value, out T1 remainder)
#if NET
public bool TryPickT0([NotNullWhen(true)] out T0? value, [NotNullWhen(false)] out T1? remainder)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would invert this to public bool TryPickT0([MaybeNullWhen(false)] out T0? value, [MaybeNullWhen(true)] out T1? remainder) - just as Dictionary<TKey, TValue>.TryGetValue, as it better supports a nullable type as type parameter

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.

Possible Nullability Analysis Issue with TryPickTx Not Triggering Warnings

2 participants