[Issue 14239] New: template destructor attribute deduction conflicts with object.TypeInfo.destroy
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Mar 3 08:10:39 PST 2015
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: nobody at puremagic.com
Reporter: vlevenfeld at 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- at 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
--
More information about the Digitalmars-d-bugs
mailing list