[Issue 6360] New: @property is doubled in di files when used with auto

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 21 22:11:45 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6360

           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
        AssignedTo: nobody at puremagic.com
        ReportedBy: jmdavisProg at gmx.com


--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list