D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 12081 - Warn against, and then deprecate class allocators
Summary: Warn against, and then deprecate class allocators
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2014-02-05 04:11 UTC by bearophile_hugs
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2014-02-05 04:11:40 UTC
According to the docs class allocators are deprecated:
http://dlang.org/class.html#allocators

But this code gives no warnings nor deprecation errors, that I suggest to introduce:


class Foo {
    new(size_t sz) { return null; }
    delete(void* p) {}
}
void main() {}
Comment 1 basile-z 2019-02-13 02:56:01 UTC
They've been removed now. Only one limited form remains, with @disable, to allow blocking the 'new' operator.