← Back to index
|
Original Bugzilla link
Bug 4352 – Destructor of inner struct not callale
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2010-06-19T22:49:00Z
Last change time
2012-06-01T04:11:33Z
Assigned to
nobody
Creator
andrei
Comments
Comment #0
by andrei — 2010-06-19T22:49:47Z
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.
Comment #1
by andrei — 2010-06-19T23:00:02Z
Simpler example: import std.typecons; struct RefCounted(T) { Tuple!(T, size_t) * _refCountedStore; } struct Payload { ~this() { } } RefCounted!(Payload) _data;
Comment #2
by eco — 2012-04-24T15:28:42Z
I get no error compiling either of these with DMD 2.059 on Windows.
Comment #3
by k.hara.pg — 2012-06-01T04:11:33Z
Works in 2.060head.