[Issue 2955] Compiler rejects chained <>=
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat May 9 08:31:44 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2955
jarrett.billingsley at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Comment #1 from jarrett.billingsley at gmail.com 2009-05-09 10:31 -------
This is by design. Comparison operators cannot be chained like this. C
accepts such foolishness as "a < b < c" even though it doesn't do what you'd
expect (i.e. it doesn't evaluate to "a < b && b < c"). D changed all
comparison operators to have the same precedence so that this kind of code
would not be accepted, and for possible future expansion in which chained
comparisons really would be converted into multiple clauses.
--
More information about the Digitalmars-d-bugs
mailing list