https://issues.dlang.org/show_bug.cgi?id=18198
Issue ID: 18198
Summary: @disable semantic not applied for the delete operator
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
---
class Foo
{
@disable delete(void*){}
}
void main()
{
Foo foo = new Foo;
delete foo;
}
---
is accepted, but not
---
class Foo
{
@disable new (size_t){return null;}
}
void main()
{
Foo foo = new Foo;
delete foo;
}
---
there should be a symmetry between "@disable new" and "@disable delete"
--