http://d.puremagic.com/issues/show_bug.cgi?id=10315
Summary: Conditional triple operator unifies a char and a dchar as a unit Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2013-06-09 07:03:23 PDT --- void main() { dchar c; pragma(msg, typeof(true ? c : ' ')); } DMD 2.064alpha prints: uint Expected: dchar That bad type unification causes situations like: import std.stdio: writeln; import std.algorithm: map; void main() { "just 1256 some text" .map!(c => true ? c : ' ') .writeln; } That prints: [106, 117, 115, 116, 32, 49, 50, 53, 54, 32, 115, 111, 109, 101, 32, 116, 101, 120, 116] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------