digitalmars.D.bugs - [Issue 7205] New: Function attribute inference fails in case of mutual dependencies
- d-bugmail puremagic.com (26/26) Jan 02 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7205
- d-bugmail puremagic.com (14/14) Jun 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7205
http://d.puremagic.com/issues/show_bug.cgi?id=7205 Summary: Function attribute inference fails in case of mutual dependencies Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch --- Comment #0 from timon.gehr gmx.ch 2012-01-02 14:07:28 PST --- Tested with DMD 2.057. void foo()(){bar();} void bar()(){foo();} void qux() safe pure nothrow{foo();} Error: pure function 'qux' cannot call impure function 'foo' Error: safe function 'qux' cannot call system function 'foo' Error: foo is not nothrow Error: function tt.qux 'qux' is nothrow yet may throw The code should compile. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 02 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7205 timon.gehr gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid, spec --- Comment #1 from timon.gehr gmx.ch 2012-06-27 05:10:28 PDT --- Apparently the spec has been changed to document the buggy behaviour. function.html: "Cyclic functions (i.e. functions that wind up directly or indirectly calling themselves) are inferred as being impure, throwing, and system." Therefore this is now both a spec and a compiler bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 27 2012