February 02, 2014 [Issue 8044] Print names, not casted values when using enum template parameter | ||||
---|---|---|---|---|
| ||||
https://d.puremagic.com/issues/show_bug.cgi?id=8044 --- Comment #2 from bearophile_hugs@eml.cc 2014-02-02 07:40:43 PST --- Related problem: import std.stdio; enum Foo { A, B } const Foo f = Foo.A; enum Bar : ubyte { C, D } const Bar b = Bar.C; void main() { pragma(msg, f, " ", b); writeln(f, " ", b); } Output: cast(Foo)0 cast(Bar)cast(ubyte)0u A C Expected output: A C A C -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation