www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - need 'this' to access member

class A
{
   void foo(int i) {}
   void foo(float f) {}
}

class B: A
{
   alias A.foo foo; // (9)
   override void foo(int i) { foo(); } // (10)
   void foo() {};
}

void main()
{
   B b;
   b.foo(1.0f);
}

DMD 0.108 outputs:
ta.d(10): need 'this' to access member foo

If (10) rewrite as 'override void foo(int i) { this.foo(); } program  
compiles successfully.
Nov 30 2004