int a; static void f(){} scope d = (){ a = 0; }; static assert(isSomeFunction!f); static assert(isSomeFunction!d);
See Implementation