digitalmars.D.bugs - [Issue 8906] New: purity inference failure with opAssign and alias this
- d-bugmail puremagic.com (38/38) Oct 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8906
- d-bugmail puremagic.com (12/12) Oct 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8906
- d-bugmail puremagic.com (11/13) Nov 03 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8906
- d-bugmail puremagic.com (11/11) Nov 08 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8906
http://d.puremagic.com/issues/show_bug.cgi?id=8906 Summary: purity inference failure with opAssign and alias this Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: nilsbossung googlemail.com --- Comment #0 from Nils <nilsbossung googlemail.com> 2012-10-29 02:36:33 PDT --- --- cat > test.d <<CODE struct S() { // needs to be a template to trigger the bug void impl()(int) {} // template for purity inference // unused, needed to trigger the bug: int i; alias i this; alias impl opAssign; } pure void p() { S!() s; s.impl(42); } alias S!() Dummy; // unused, needed to trigger the bug CODE dmd -c -o- test.d --- test.d(12): Error: pure function 'p' cannot call impure function 'impl' --- Looks like alias this and opAssign clash somehow. Works with 2.060. Fails since this commit: https://github.com/D-Programming-Language/dmd/commit/9ee798f73a2f7765a68bbe8f40ff292f551dab72 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8906 Nils <nilsbossung googlemail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|purity inference failure |attribute inference failure |with opAssign and alias |with opAssign and alias |this |this --- Comment #1 from Nils <nilsbossung googlemail.com> 2012-10-29 21:49:50 PDT --- Inference of nothrow and safe fails, too. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8906 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Depends on| |6356 --- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2012-11-03 05:45:24 PDT ---Works with 2.060. Fails since this commit: https://github.com/D-Programming-Language/dmd/commit/9ee798f73a2f7765a68bbe8f40ff292f551dab72The root cause is bug 6356, and the commit just exposed the issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 03 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8906 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2012-11-08 09:46:44 PST --- By fixing issue 6356, the code compiles correctly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 08 2012