private attribute don't function?

Zhouxuan pycerl at qq.com
Sat Oct 5 08:19:32 PDT 2013


import std.stdio;

class A
{
	private int j = 1;
	
	private
	{
		int k = 2;
	}
	
private:
	int i = 0;
}

void main()
{
	A a = new A;
	writeln(a.i);
	writeln(a.j);
	writeln(a.k);
}

It compiles and output 0 1 2 repectively.


More information about the Digitalmars-d mailing list