Bug 14239 – template destructor attribute deduction conflicts with object.TypeInfo.destroy

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-03-03T16:10:00Z
Last change time
2015-08-04T02:54:57Z
Assigned to
nobody
Creator
vlevenfeld

Comments

Comment #0 by vlevenfeld — 2015-03-03T16:10:39Z
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
Comment #1 by k.hara.pg — 2015-08-04T02:54:57Z
*** This issue has been marked as a duplicate of issue 14838 ***