Bug 2860 – enum convert error

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2009-04-19T23:41:00Z
Last change time
2015-06-09T01:27:45Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
davidl

Comments

Comment #0 by davidl — 2009-04-19T23:41:48Z
import std.stdio; enum abc:int{ vv,cc } enum kkk:abc { mm = cast(abc)(abc.cc+1) } void main() { kkk t; t = kkk.vv; // this should work? instead I get this error message: Error: cannot implicitly convert expression (cast(abc)0) of type abc to kkk }
Comment #1 by fvbommel — 2009-04-20T01:33:00Z
*** This bug has been marked as a duplicate of 2859 ***