DependencyPropertyGenerator icon indicating copy to clipboard operation
DependencyPropertyGenerator copied to clipboard

partial Coerce function of nullable type value-type generates "??"

Open stilldesign opened this issue 8 months ago • 0 comments

Describe the bug

If you declare a [DependencyProperty] with a nullable value-type generic that also has coerce, then the partial signature has two nullable ?

Reference types do not have this issue.

Steps to reproduce the bug

If you declare a [DependencyProperty] with a nullable value-type generic that also has coerce, then the partial signature has two nullable ?:

[DependencyProperty<double?>("Value", Coerce = true)]

...

private partial double? CoerceValue(double?? value);

The signature is correct in v.1.4.0 but wrong in v1.5.0

Expected behavior

No response

Screenshots

Attribute: Image

Generated partials: Image

NuGet package version

v1.5.0

IDE

Visual Studio 2022-preview

Additional context

No response

stilldesign avatar May 03 '25 10:05 stilldesign