https://issues.dlang.org/show_bug.cgi?id=14239
Issue ID: 14239 Summary: template destructor attribute deduction conflicts with object.TypeInfo.destroy Product: D Version: D1 & D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: vlevenf...@gmail.com CODE: struct Foo (R) { R[2] x; } struct Bar () { ~this (){} } struct Baz { Foo!(Bar!()) y; } OUTPUT: Error: pure function 'test.Foo!(Bar!()).Foo.~this' cannot call impure function 'object.TypeInfo.destroy' source/evx/test.d(1): Error: safe function 'test.Foo!(Bar!()).Foo.~this' cannot call system function 'object.TypeInfo.destroy' source/evx/test.d(1): Error: @nogc function 'test.Foo!(Bar!()).Foo.~this' cannot call non-@nogc function 'object.TypeInfo.destroy' source/evx/test.d(1): Error: 'object.TypeInfo.destroy' is not nothrow source/evx/test.d(1): Error: destructor 'test.Foo!(Bar!()).Foo.~this' is nothrow yet may throw source/evx/test.d(12): Error: template instance test.Foo!(Bar!()) error instantiating --