Skip to content

Add support for Generic Nullable parameters#4872

Merged
manfred-brands merged 2 commits into
nunit:mainfrom
manfred-brands:issue4868_GenericNullable
Nov 2, 2024
Merged

Add support for Generic Nullable parameters#4872
manfred-brands merged 2 commits into
nunit:mainfrom
manfred-brands:issue4868_GenericNullable

Conversation

@manfred-brands
Copy link
Copy Markdown
Member

@manfred-brands manfred-brands commented Nov 2, 2024

Fixes #4868
Fixes #150

The PR fixes this:

[TestCase(0)]
[TestCase(1L)]
[TestCase(2UL)]
[TestCase(3F)]
[TestCase(4D)]
public void GenericNullable<TValue>(TValue? value)
    where TValue : struct, IConvertible

With the generic type determined correctly:

{0AFD890A-51E3-4C21-AE05-53C80F2A4F14}

Copy link
Copy Markdown
Member

@OsirisTerje OsirisTerje left a comment

Choose a reason for hiding this comment

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

lgtm

@manfred-brands manfred-brands force-pushed the issue4868_GenericNullable branch from a34e136 to 0449cdd Compare November 2, 2024 09:57
@manfred-brands manfred-brands merged commit 2a0ec35 into nunit:main Nov 2, 2024
@manfred-brands manfred-brands deleted the issue4868_GenericNullable branch November 2, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants