Summary: @property is doubled in di files when used with auto
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Jonathan M Davis <> 2011-07-21 22:11:41 
PDT ---
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.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to