Bug 7326 – write interprets enum with byte backing type as a character

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-20T09:57:00Z
Last change time
2012-04-19T08:43:40Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2012-01-20T09:57:24Z
import std.stdio; enum X : byte { Foo = 65, } void main() { X x; writeln(x); // writes 'A' writeln(cast(byte)x); // writes 65 }
Comment #1 by code — 2012-04-19T08:43:40Z
Using DMD 2.059, this prints: --- Foo 65 --- Closing as fixed.