[Issue 9398] Wrong diagnostic for ternary operator type mismatch
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 26 13:00:59 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9398
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|strange error message |Wrong diagnostic for
|"incompatible types for |ternary operator type
|..." for temary operator |mismatch
--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-26 13:00:58 PST ---
(In reply to comment #0)
> It should be ... ((a) ? (b) : (c)): 'B' and 'C'
Nope, it should be:
> ((b) : (c)): 'B' and 'C'
Otherwise you can't determine what position 'B' and 'C' are in because the
ternary expression could be quite complex, e.g.:
> ((a) ? (a) : (b) ? (b) : (c)): 'int' and 'float'
--
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