DMD should not compile this, but DMD2.059 does. enum int c = function(){ }; DMD2.058 or earlier: Error: cannot implicitly convert expression (__funcliteral1) of type void function() pure nothrow @safe to int
https://github.com/D-Programming-Language/dmd/pull/918
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f3d112d16dc2b04b119b0b0d5f54a030944b10e5 fix Issue 7941 - Regression(2.059): Type check is ignored when manifest constant initializer is function literal https://github.com/D-Programming-Language/dmd/commit/2cf7e9ca9a2adda375952949fc2738362392139a Merge pull request #918 from 9rnsr/fix7941 Issue 7941 - Regression(2.059): Type check is ignored when manifest constant initializer is function literal