Bug 6105 – "static:" doesn't qualify static this constructors

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2011-06-04T17:23:00Z
Last change time
2011-06-06T10:56:51Z
Assigned to
nobody
Creator
sanduleac.dan

Comments

Comment #0 by sanduleac.dan — 2011-06-04T17:23:57Z
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.
Comment #1 by sanduleac.dan — 2011-06-06T10:56:51Z
Sorry about that, apparently that's the way it's supposed to work. http://www.digitalmars.com/d/2.0/class.html#StaticConstructor