[Issue 14728] Problems in the switch statement with enumerated data types

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jun 23 14:27:24 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14728

Vladimir Panteleev <thecybershadow at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow at gmail.com

--- Comment #1 from Vladimir Panteleev <thecybershadow at gmail.com> ---
Here "," is the comma operator, which works as in C (i.e. the first expression
is evaluated but its result is discarded). It is the same situation as e.g.

if (x, y) { ... }

The compiler should probably warn that the expression "x" has no side effects.

--


More information about the Digitalmars-d-bugs mailing list