Thread overview
[Issue 21420] Nullable.get default parameter is not lazy
Nov 24, 2020
FeepingCreature
Dec 17, 2022
Iain Buclaw
November 24, 2020
https://issues.dlang.org/show_bug.cgi?id=21420

--- Comment #1 from FeepingCreature <default_357-line@yahoo.de> ---
Oh, I see. It's an issue with lazy... I've tried to fix this, and it runs into the issue that lazy, being not templated, cannot transfer call site guarantees such as @safe and nothrow into the getter function, hence breaking get()'s annotations of nothrow and @safe in a way that makes it unusable in nothrow/@safe code.

And there is not even hope that DIP1033 fixes this, because the knowledge that the expression is @safe/nothrow cannot be transferred in through a function call - because the conversion to delegate happens *after* the template instantiation, and the delegate type is the first place that we could have @safe/nothrow knowledge.

Damn...

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=21420

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
December 01
https://issues.dlang.org/show_bug.cgi?id=21420

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/9812

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--