name resolution and static function

Carlos Santander csantander619 at gmail.com
Sun Jul 9 19:25:27 PDT 2006


I'm sure this also has to do with how name resolution works, but here it is anyway:

//---------------------------------
class A
{
         void foo () {}
         //private
         static void foo (int i) {}
}

class B
{
         void foo (int x)
         {
                 A.foo (x);
         }
}
//---------------------------------

I get:
test.d:12: 'this' is required, but test.A is not a base class of B

And if I uncomment the private attribute in A, I get:
test.d:12: 'this' is required, but test.A is not a base class of B
test.d:12: class test.B member foo is not accessible

gdc rev 13 (DMD 0.162)

-- 
Carlos Santander Bernal



More information about the Digitalmars-d-bugs mailing list