http://d.puremagic.com/issues/show_bug.cgi?id=10789
Summary: Struct destructor erroneously called Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: slud...@outerproduct.org --- Comment #0 from S�nke Ludwig <slud...@outerproduct.org> 2013-08-09 22:54:25 PDT --- The attached program simulates a simple reference counted struct. 'fun' is supposed to return a newly initialized S with a count of 1. Instead it calls the destructor dropping the count to zero and then returns a copy of the initialized struct. Leaving out the 'if' statment and returning the fresh 'S' directly does not exibit this behavior. This issue is critical as it has a high probability to indroduce hard to detect/track down bugs when automatic reference counting is used. Tested on DMD 2.063.2/Win32 and /Win64 and DMD master/Win32. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------