Bug 4630 – Primitive arguments to pure functions need not be converted to const

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-08-11T19:38:00Z
Last change time
2010-08-15T21:24:26Z
Assigned to
nobody
Creator
dsimcha

Comments

Comment #0 by dsimcha — 2010-08-11T19:38:54Z
void fun(uint x) pure { pragma(msg, typeof(x)); // const(uint) } Implicitly converting x to const is completely pointless, since it's just a stack variable with no indirection whatsoever.
Comment #1 by bearophile_hugs — 2010-08-12T04:21:51Z
See bug 2832
Comment #2 by dsimcha — 2010-08-15T21:24:26Z
Thanks, Bearophile. It's definitely a duplicate. *** This issue has been marked as a duplicate of issue 2832 ***