Bug 634 – writef doesn't work on enums

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-12-02T20:46:00Z
Last change time
2014-02-15T13:28:50Z
Assigned to
bugzilla
Creator
smjg

Comments

Comment #0 by smjg — 2006-12-02T20:46:44Z
---------- import std.stdio; enum Qwert { Yuiop, Asdfg } void main() { writefln(Qwert.Yuiop); } ---------- Error: std.format formatArg ---------- The same happens with either writefln("%s", Qwert.Yuiop); or writefln("%d", Qwert.Yuiop); It may be the case that formatting of enums isn't yet implemented. But would it do any harm to have it just write out the numerical value for the meantime? In particular, there's no reason that the %d format shouldn't already work on them.
Comment #1 by bugzilla — 2006-12-27T02:00:00Z
Fixed DMD 0.178