Bug 7941 – Regression(2.059): Type check is ignored when manifest constant initializer is function literal
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-18T21:34:00Z
Last change time
2012-05-01T23:12:59Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
kekeniro2
Comments
Comment #0 by kekeniro2 — 2012-04-18T21:34:36Z
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