alias int function(int) function_type;


void main()
{
        bar!foo(2);
        bar!((int i)=> i*2)(2);
}

int foo(int i)
{
    return i;
}

void bar(alias baz)(int i)
{
        static if (!is(typeof(baz) == function_type))
        {
                pragma(msg, typeof(baz), " != ", function_type); //wtf?
        }

        std.stdio.writeln(bar(i));
}

Where am I wrong?

Reply via email to