[Issue 14754] [REG2.068b1] 64bit wrong code with -inline

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 1 09:20:11 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14754

--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
Reduced test case:

auto aafunc(string k)
{
    enum aa = [ "K": "V" ];
    auto p = k in aa;
    return null;
}

struct MapResult(alias fun, R)
{
    R _input;

    @property auto ref front()
    {
        return fun(_input[0]);
    }
}

auto array(R)(R r)
{
    alias E = typeof(r.front);
    E[] result;
    result ~= r.front;
    return result;
}

auto mapfun(R)(R words, string k)
{
    return array(MapResult!(s => aafunc(k), R)(words));
}

void main()
{
    auto r = mapfun([""], "");
}

--


More information about the Digitalmars-d-bugs mailing list