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: nob...@puremagic.com ReportedBy: ilya-stromberg-2...@yandex.ru --- Comment #0 from ilya-stromberg <ilya-stromberg-2...@yandex.ru> 2014-01-22 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: -------