[Issue 10315] Conditional triple operator unifies a char and a dchar as a uint
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 2 01:16:29 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10315
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Conditional triple operator |Conditional triple operator
|unifies a char and a dchar |unifies a char and a dchar
|as a unit |as a uint
--- Comment #2 from Don <clugdbug at yahoo.com.au> 2013-09-02 01:16:27 PDT ---
If you have
char c;
dchar d;
I agree that (true ? d : ' ') should be a dchar, but only because ' ' can be
implicitly converted to dchar by applying value range propagation.
But (true ? d : c) should not. It's reasonable for it to be a uint. Because c
might be a UTF8 code point, not a character, so casting it to a dchar would be
incorrect.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list