[Issue 5540] Probable bug-hiding redundancies
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 29 17:01:37 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5540
--- Comment #6 from bearophile_hugs at eml.cc 2011-06-29 16:56:41 PDT ---
A class of bug-hiding redundancy:
if (x == 10)
foo1();
else if (x == 20)
foo2();
else if (x == 10) // ***
foo3();
Another class, two assignments to the same variable in a row:
x = foo();
x = bar();
While this is OK:
x = 1;
x = x + 1;
x = foo(x);
Another class (the two branches are equal):
if (x)
foo();
else
foo();
--
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