www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4352] New: Destructor of inner struct not callale

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4352

           Summary: Destructor of inner struct not callale
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrei metalanguage.com


--- Comment #0 from Andrei Alexandrescu <andrei metalanguage.com> 2010-06-19
22:49:47 PDT ---
Compiling this:

struct Array(T)
{
    struct Payload
    {
        ~this()
        {
        }
    }
    RefCounted!(Payload, RefCountedAutoInitialize.no) _data;
}

unittest
{
    Array!int a;
}

ends with error message:

/home/andrei/code/dmd/phobos/std/typecons.d(365): Error: destructor
test.Array!(int).Array.Payload.~this () is not callable using argument types ()

The reported location is mistaken too.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 19 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4352



--- Comment #1 from Andrei Alexandrescu <andrei metalanguage.com> 2010-06-19
23:00:02 PDT ---
Simpler example:

import std.typecons;

struct RefCounted(T)
{
    Tuple!(T, size_t) * _refCountedStore;
}

struct Payload
{
    ~this()
    {
    }
}

RefCounted!(Payload) _data;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 19 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4352


Brad Anderson <eco gnuk.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eco gnuk.net


--- Comment #2 from Brad Anderson <eco gnuk.net> 2012-04-24 15:28:42 PDT ---
I get no error compiling either of these with DMD 2.059 on Windows.

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