Bug 18198 – @disable semantic not applied for the delete operator
Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-01-05T21:55:22Z
Last change time
2018-03-16T20:33:13Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
Basile-z
Comments
Comment #0 by b2.temp — 2018-01-05T21:55:22Z
---
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"