Class declaration
negerns
negerns2000 at gmail.com
Fri Oct 5 01:39:15 PDT 2007
I have been testing/configuring a UML tool to generate D classes/files
when I came across D's class attributes scope and final. I wondered if D
classes have other attributes like public, private, protected. So I
tried it and tested some D source codes. Here is one that I tried:
private protected public class A {
public this() { }
}
void main() {
auto a = new A();
}
This code was successfully compiled using dmd 1.021 without errors or
warnings, much to my surprise. Could anyone please tell me why is this so?
--
negerns
More information about the Digitalmars-d-learn
mailing list