digitalmars.D.bugs - [Issue 11970] New: Self-assigned variable expression with no effect doesn't have compiler error
- d-bugmail puremagic.com (28/28) Jan 22 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11970
- d-bugmail puremagic.com (10/10) Jan 22 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11970
- d-bugmail puremagic.com (9/9) Jan 22 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11970
https://d.puremagic.com/issues/show_bug.cgi?id=11970 Summary: Self-assigned variable expression with no effect doesn't have compiler error Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: ilya-stromberg-2009 yandex.ru 08:23:44 PST --- Reduced example: void main() { int i; i = i; } The code `i = i;` does nothing, but there are no compiler error. This error in real life: https://github.com/rejectedsoftware/vibe.d/issues/406 Note that we already have errors for no effect expression, for example for this code: `int i; i;` - `Error: var has no effect in expression (i)`. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 22 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11970 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs eml.cc Voted +1. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 22 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11970 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies gmail.com Severity|normal |enhancement -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 22 2014