DavidArno / SuccincT

Discriminated unions, pattern matching and partial applications for C#
MIT License
267 stars 15 forks source link

Add implicit conversion from value to Maybe #50

Closed DeafLight closed 6 years ago

DeafLight commented 6 years ago

Fixes a gap between what is described in the wiki (https://github.com/DavidArno/SuccincT/wiki/Maybe_T_#construction) and the actual behavior (compilation error when trying to implicitly convert a value to a Maybe). Added the unit test that checks this behavior on both Option and Maybe.

DavidArno commented 6 years ago

Note to self: review this soon. Maybe justified in pushing out a 3.1.1 bugfix release for this, rather than waiting for 4.0.

DavidArno commented 5 years ago

As part of merging this into v4, much of the change becomes redundant as Maybe<T> has been removed and Option<T> becomes a struct. The test added for Option<T> is kept.