[Issue 6169] [CTFE] pure functions cannot compute constants using functions not marked as pure

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 31 02:27:58 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=6169


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com


--- Comment #6 from monarchdodra at gmail.com 2013-01-31 02:27:40 PST ---
Just wanted to add that I just hit this bug. Any news on the progression of
this bug fix?

I'm hitting this on a rather trivial use case, where I'm just trying to
generate a compile-time-known error message:

//----
import std.string : format;

struct S
{
    int* p;
    ref inout(int) get() inout nothrow pure @safe
    {
        enum message = format("Called %s on null %s.", "get", S.stringof);
        assert(p, message);
        return *p;
    }
}
//----

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list