Bug 6360 – @property is doubled in di files when used with auto

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-07-21T22:11:00Z
Last change time
2015-06-09T05:15:23Z
Keywords
patch
Assigned to
nobody
Creator
issues.dlang

Comments

Comment #0 by issues.dlang — 2011-07-21T22:11:41Z
As an example, take any property in core.time - say @property long weeks() const pure nothrow { return get!"weeks"(); } Now make it return auto instead of long. Rebuild druntime, and time.di will have this for weeks: auto @property const pure nothrow @property weeks() { return get!("weeks")(); } Notice that @property is doubled. This will cause compilation errors for Phobos such as ../druntime/import/core/time.di(136): redundant storage class identifier However, if you change it back to long, you get @property const pure nothrow long weeks() { return get!("weeks")(); } So, @property and auto are not getting along when .di files are generated.
Comment #1 by k.hara.pg — 2011-09-22T07:34:16Z
Comment #2 by bugzilla — 2011-09-24T21:02:36Z