http://d.puremagic.com/issues/show_bug.cgi?id=2634
Summary: Function literals are non-constant. Product: D Version: 2.023 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzi...@digitalmars.com ReportedBy: burton-rad...@shaw.ca This code fails compilation: void test () { } // Compiles okay. auto a = &test; // Error: non-constant expression __funcliteral1 auto b = function void () { }; As far as I can tell there is no reason for function literals to be non-constant if they're not synthesized during runtime. --