Array operation for computing the dot product?

Ali Çehreli acehreli at yahoo.com
Fri Feb 5 17:34:15 PST 2010


Walter Bright wrote:
 > retard wrote:
 >> module m1;
 >>
 >> class Foo {
 >>   public void bar() {}
 >> }
 >>
 >> class Bar : private foo {
 >> }
 >>
 >> module m2;
 >> import m1;
 >>
 >> void main() {
 >>   Foo a = new Bar();
 >>   a.bar();
 >> }
 >>
 >> // compiles and runs just fine
 >
 > That's a bug in dmd. It should behave like the C++ does.

It would be different from C++ if everything were in the same module, right?

If I understand it correctly, private is not honored for the code in the 
same module. Is that for all uses of private?

Ali




More information about the Digitalmars-d mailing list