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"
Comment #1 by b2.temp — 2018-03-16T20:33:13Z
Because of https://github.com/dlang/dmd/pull/8042, which i believe will be merged soon or later, it's not even worth fixing this issue.