[Issue 4558] To spot a possible bug in code that doesn't change a value

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jun 9 23:54:07 PDT 2017


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

Infiltrator <lt.infiltrator at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lt.infiltrator at gmail.com

--- Comment #1 from Infiltrator <lt.infiltrator at gmail.com> ---
So, if I understand correctly, you want the compiler to statically calculate
results where all the inputs are known at compile-time and detect when no
change has occurred in a "&=" (and presumably in other operator-assignment
operators?)  

In such cases, should the compiler raise a warning or an error?

This all fits in nicely with CTFE.

--


More information about the Digitalmars-d-bugs mailing list