[Issue 5868] New: static attribute ignored with public static {} blocks

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 21 05:39:18 PDT 2011


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

           Summary: static attribute ignored with public static {} blocks
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: aldacron at gmail.com


--- Comment #0 from Mike Parker <aldacron at gmail.com> 2011-04-21 05:35:39 PDT ---
The following produces an error for conflicting constructors, "Previous
Definition Different".

class Foo
{
    public static
    {
        this() {}
    }

    public
    {
        this() {}
    }
}

Remove the curly braces from the public static and it compiles fine. With
anything defined or declared in a public static block, the static attribute is
ignored. I'm sure this used to work, once upon a time. Tested on 2.052 only.

-- 
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