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.
Simpler example: import std.typecons; struct RefCounted(T) { Tuple!(T, size_t) * _refCountedStore; } struct Payload { ~this() { } } RefCounted!(Payload) _data;
I get no error compiling either of these with DMD 2.059 on Windows.
Works in 2.060head.