www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8295] New: Struct member destructor can not be called from shared struct instance

http://d.puremagic.com/issues/show_bug.cgi?id=8295

           Summary: Struct member destructor can not be called from shared
                    struct instance
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code benjamin-thaut.de



PDT ---
Created an attachment (id=1119)
repro case

If a struct a has another struct b as a member which has a destructor and the
struct a is created as shared, the destructor of b can not be called.
The error message dmd generates is:

Error: destructor main.bar.~this () is not callable using argument types ()

Tested with dmd 2.059

This prevents one from using shared properly together with structs.

See attached repro case

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 25 2012