www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10501] New: Can't put the safety attribute at the end of module constructor signature

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

           Summary: Can't put the safety attribute at the end of module
                    constructor signature
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: tommitissari hotmail.com


--- Comment #0 from Tommi <tommitissari hotmail.com> 2013-06-29 09:22:18 PDT ---
The safety attributes:  safe,  trusted and  system can be put only before the
static constructor signature, not at the end of it. This is not consistent with
their behaviour in other function signatures:

class C
{
    this()  safe { } // OK

    void foo()  safe { } // OK
}

 safe static this() { } // OK

static this()  safe { } // Error

shared static this()  safe { } // Error

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 29 2013