April 15, 2005
private/public work inside a struct, but they have no effect on the access level of the structs members (private/public are not implemented in structs).

Could access specifiers be implemented for structs? This would be great.


April 16, 2005
imr1984 wrote:
> private/public work inside a struct, but they have no effect on the access level
> of the structs members (private/public are not implemented in structs).
> 
> Could access specifiers be implemented for structs? This would be great.
> 
> 

Confirmed. (cross-posted to bugs ng)

//----------------------------------
// file a.d
struct A
{
	public int x;
	private char y;
}

//----------------------------------
// file b.d
import a;
void main()
{
	A a;
	a.x=1;
	a.y='a';
}
//----------------------------------

Compiles and runs when it shouldn't.

-- 
Carlos Santander Bernal

JP2, you'll always live in our minds