void fun() {} void main() { auto a = &fun; const b = a; assert(a == b); } This fails to compile. The error message is odd too: Error: array equality comparison type mismatch, void function() vs const(void function()) The code should work.
Possible fix: https://github.com/D-Programming-Language/dmd/pull/89
Better fix: https://github.com/D-Programming-Language/dmd/pull/96
https://github.com/D-Programming-Language/dmd/commit/306df8eaa6f8a987f76f401a1e03d8edf1f1e2ae