public static and static public
Lars Ivar Igesund
larsivar at igesund.net
Wed May 24 09:32:33 PDT 2006
When using a static ctor, it turns out that I need to do
public static this() {}
If I do static public this() {}, the static is just ignored and the ctor is
considered a normal ctor. That something is wrong isn't noticed until you
try to instantiate the object with the normal ctor, as you then will get a
conflict, or in some cases a link error (I wasn't able to make a minimal
test case out of the link error, but it disappeared when I switched the
order).
AFAICS, the documentation don't really say anything on this, except possibly
where it is said that static is ignored for "other declarations". And as
such I guess the public don't really make any sense to use for a static
ctor.
Anyway, maybe clarify that two attributes in a row is disallowed? Or
ignored?
--
Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi
More information about the Digitalmars-d-bugs
mailing list