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

--- Comment #6 from Iain Buclaw <[email protected]> ---
(In reply to Iain Buclaw from comment #3)
> Possible reduction of the original.
Which can be hand simplified further to:
---
struct SumType
{
    int cases;
}

auto caseOfTemplated(alias func, T)(T s)
{
    return func(s.cases);
}

void foo()
{
    auto validate()
    {
        SumType s;
        auto t = caseOfTemplated!(a => typeid(a))(s) == typeid(string);
        return true;
    }
    static assert(validate);
}

--

Reply via email to