[Issue 17954] New: init member should be disallowed
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 31 02:16:32 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17954
Issue ID: 17954
Summary: init member should be disallowed
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: schveiguy at yahoo.com
Now that Phobos and DMD do not have any types that define an init member of any
kind (TypeInfo.init was the only culprit), we should disallow defining members
with the name init. This allows generic code to correctly assume that T.init
will be the exact default initializer instance of a type.
I propose that in the next compiler release (at time of this writing, that
would be 2.078) defining an init member should be a deprecation warning. Then
at the next compiler release, it is an error.
--
More information about the Digitalmars-d-bugs
mailing list