Bug 17465 – stringof is allowed as identifier

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-06-03T08:31:28Z
Last change time
2020-01-08T17:10:08Z
Assigned to
No Owner
Creator
Basile-z

Comments

Comment #0 by b2.temp — 2017-06-03T08:31:28Z
Maybe its usage as identifier should be deprecated ? --- import std.stdio; class Foo { static class stringof { } } void main() { writeln(Foo.stringof); } ---
Comment #1 by doob — 2017-06-03T15:18:48Z
Many of the built-in properties can be used as identifiers, not only stringof. I would prefer if all or most of them would move to a different namespace, like __traits.
Comment #2 by b2.temp — 2020-01-08T17:10:08Z
*** This issue has been marked as a duplicate of issue 7066 ***