-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
capabilities: avoid NRE when ValueOrBinding<int>? is set to null
Nullable ValueOrBinding, for example ValueOrBinding<int>? semantially means that the property is not set. If the property is set to null, we would like to return null inside of the ValueOrBinding. However, that is not possible if T is non-nullable value type, so either have to throw, or return an "outer" null. This patch changes the behavior to return null instead of failing. Users are unlikely to care about "not set" and "set to null", and throwing the exception creates unnecessary friction.
- Loading branch information
Showing
3 changed files
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters