Generic RelayCommand with Nullable Types #680
Unanswered
symbiogenesis
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When nullable types are enabled, the following code results in CS8622, because the compiler thinks the OnOpenPhoto() method should have a nullable RecordPhoto parameter, even though I did not pass in the RecordPhoto type to the AsyncRelayCommand as nullable.
This seems like a deficiency, because ideally the nullability should be preserved.
And indeed, when inspecting the CommunityToolkit source code, one can see that it is marking the Func as accepting a nullable generic
Beta Was this translation helpful? Give feedback.
All reactions