Thread overview
[Issue 13017] opEquals for null std.typecons.Nullable
Sep 04, 2015
Tomáš Chaloupka
Apr 05, 2016
Jack Stouffer
Apr 05, 2016
Luís Marques
Jan 13, 2017
Jonathan M Davis
Jan 13, 2017
Jonathan M Davis
May 02, 2017
Mario Kroeplin
September 04, 2015
https://issues.dlang.org/show_bug.cgi?id=13017

Tomáš Chaloupka <chalucha@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chalucha@gmail.com

--- Comment #1 from Tomáš Chaloupka <chalucha@gmail.com> ---
Similar problem, same exception:

import std.typecons;

struct Foo
{
    Nullable!int field;
}

void main()
{
    Foo a;
    assert (a == Foo.init);
}

--
April 05, 2016
https://issues.dlang.org/show_bug.cgi?id=13017

Jack Stouffer <jack@jackstouffer.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monkeyworks12@hotmail.com

--- Comment #2 from Jack Stouffer <jack@jackstouffer.com> ---
*** Issue 14804 has been marked as a duplicate of this issue. ***

--
April 05, 2016
https://issues.dlang.org/show_bug.cgi?id=13017

Luís Marques <luis@luismarques.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luis@luismarques.eu

--- Comment #3 from Luís Marques <luis@luismarques.eu> ---
This is the behavior I was looking for / expecting, unlike the behavior suggested in Issue 14804, which would be more akin to NaNs (nulls don't compare equal).

--
January 13, 2017
https://issues.dlang.org/show_bug.cgi?id=13017

Jonathan M Davis <issues.dlang@jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang@jmdavisProg.co
                   |                            |m

--- Comment #4 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
Blast it. The current behavior is _extremely_ annoying once you start having member variables which are Nullable. You're forced to implement opEquals to work around this.

--
January 13, 2017
https://issues.dlang.org/show_bug.cgi?id=13017

--- Comment #5 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
https://github.com/dlang/phobos/pull/5032

--
January 14, 2017
https://issues.dlang.org/show_bug.cgi?id=13017

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/5dc7aa24217bb7751200eb5b2e869c2c5feab557 Fix issue #13017: opEquals for null std.typecons.Nullable

I was getting sick of this not working, and there have been multiple bug reports on this, so I'm just fixing it. With these changes, using == and != on null Nullables will not result in an AssertError but instead will consider them equal if they're both null, equal if they're both non-null and have the same value, and not equal otherwise.

https://github.com/dlang/phobos/commit/d94442c8e758cef0bb3d2a163d464a68049556de Merge pull request #5032 from jmdavis/issue_13017

Fix issue #13017: opEquals for null std.typecons.Nullable

--
January 14, 2017
https://issues.dlang.org/show_bug.cgi?id=13017

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
January 16, 2017
https://issues.dlang.org/show_bug.cgi?id=13017

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to newCTFE at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/5dc7aa24217bb7751200eb5b2e869c2c5feab557 Fix issue #13017: opEquals for null std.typecons.Nullable

https://github.com/dlang/phobos/commit/d94442c8e758cef0bb3d2a163d464a68049556de Merge pull request #5032 from jmdavis/issue_13017

--
March 22, 2017
https://issues.dlang.org/show_bug.cgi?id=13017

--- Comment #8 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/5dc7aa24217bb7751200eb5b2e869c2c5feab557 Fix issue #13017: opEquals for null std.typecons.Nullable

https://github.com/dlang/phobos/commit/d94442c8e758cef0bb3d2a163d464a68049556de Merge pull request #5032 from jmdavis/issue_13017

--
May 02, 2017
https://issues.dlang.org/show_bug.cgi?id=13017

Mario Kroeplin <kroeplin.d@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |qaston@gmail.com

--- Comment #9 from Mario Kroeplin <kroeplin.d@googlemail.com> ---
*** Issue 10771 has been marked as a duplicate of this issue. ***

--