I tried to use a function lookup table to quickly access a particular one.
But the compiler (dmd1) complains about
Error: non-constant expression & func

I guess because it's used inside a class since &func is of type function, not delegate?


Here's a stripped down example:

protected Object function(int)[] lookup = [
        &func
];

protected Object func(int)
{
        return null;
}

Reply via email to