I have no idea if it's valid code, but it does crash DMD. alexrp@alexrp ~/Projects/tests $ cat test.d void foo() { } void main() { void delegate() f = foo; } alexrp@alexrp ~/Projects/tests $ dmd test.d Segmentation fault
With 2.059 Win32: PS E:\DigitalMars\dmd2\samples> rdmd bug.d bug.d(7): Error: expression foo() is void and has no value