www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6105] New: "static:" doesn't qualify static this constructors

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6105

           Summary: "static:" doesn't qualify static this constructors
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: sanduleac.dan gmail.com



17:23:57 PDT ---
import std.stdio;

class test {
  static:
  this() {
    writeln("I should be seen!");
  }
}

void main() {
}


This program doesn't execute the static this() constructor. Changing the syntax
to "static this" makes it work.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 04 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6105


Dan Sănduleac <sanduleac.dan gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



10:56:51 PDT ---
Sorry about that, apparently that's the way it's supposed to work.
http://www.digitalmars.com/d/2.0/class.html#StaticConstructor

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