[Issue 12711] Ternary operator turns a character into an integral
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue May 6 12:52:03 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12711
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #1 from bearophile_hugs at eml.cc ---
(In reply to Andrej Mitrovic from comment #0)
> This is very ugly. I'm not sure whether it's a DMD bug or a Phobos bug
> though.
It's an ugly dmd bug:
void main() {
pragma(msg, typeof(true ? char('x') : '_'));
pragma(msg, typeof(true ? wchar('x') : '_'));
pragma(msg, typeof(true ? dchar('x') : '_'));
}
Output:
char
int
uint
But perhaps I already reported this issue, please search it in Bugzilla.
--
More information about the Digitalmars-d-bugs
mailing list