On Saturday, 30 December 2017 at 19:11:05 UTC, Steven
Schveighoffer wrote:
Please file a bug report.
Sorry for the delay - stuff happened.
I reopened an existing bug that I found:
https://issues.dlang.org/show_bug.cgi?id=17440
On 12/30/17 3:59 AM, Chris Paulson-Ellis wrote:
On Friday, 29 December 2017 at 22:08:59 UTC, vit wrote:
n = Nullable!Object.init;
assert(n.isNull == true);
[...]
more:
https://forum.dlang.org/thread/jrdedmxnycbqzcpre...@forum.dlang.org?page=1
Thanks.
No-one in the linked thread see
On Saturday, December 30, 2017 08:59:40 Chris Paulson-Ellis via Digitalmars-
d-learn wrote:
> On Friday, 29 December 2017 at 22:08:59 UTC, vit wrote:
> > n = Nullable!Object.init;
> > assert(n.isNull == true);
> >
> > [...]
> > more:
> > https://forum.dlang.org/thread/jrdedmxnycbqzcpre...@f
On Friday, 29 December 2017 at 22:08:59 UTC, vit wrote:
n = Nullable!Object.init;
assert(n.isNull == true);
[...]
more:
https://forum.dlang.org/thread/jrdedmxnycbqzcpre...@forum.dlang.org?page=1
Thanks.
No-one in the linked thread seemed to know why .destroy is used
in nullify. Looki
On Friday, 29 December 2017 at 21:43:25 UTC, Chris Paulson-Ellis
wrote:
On Friday, 29 December 2017 at 21:34:27 UTC, vit wrote:
use:
n = Nullable!Object.init; //doesn't call destroy
instead of:
n.nullify();
Only nullify() can make isNull return true again. I need that
semantic.
On Friday, 29 December 2017 at 21:43:25 UTC, Chris Paulson-Ellis
wrote:
Only nullify() can make isNull return true again. I need that
semantic.
Quick idea without much afterthought: instead of Nullable, use
pointer to o?
On Friday, 29 December 2017 at 21:34:27 UTC, vit wrote:
use:
n = Nullable!Object.init; //doesn't call destroy
instead of:
n.nullify();
Only nullify() can make isNull return true again. I need that
semantic.
On Friday, 29 December 2017 at 20:52:51 UTC, Chris Paulson-Ellis
wrote:
I've been bitten by trying to use Nullable(T) on class types.
Minimal example...
[...]
use:
n = Nullable!Object.init; //doesn't call destroy
instead of:
n.nullify();
I've been bitten by trying to use Nullable(T) on class types.
Minimal example...
import std.typecons : Nullable;
void main()
{
auto o = new Object();
o.toString();
Nullable!Object n = o;
o.toString();
n.nullify();
o.toString(); // SegV!
}
The SEGV is caused by nullify