www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - static/not static overloads

     class A {
         void foo() {
             printf("nonstatic\n");
         }

         static void foo(int x) {
             printf("static foo %i\n", x);
         }
     }

     int main() {
         A a = new A();
         A.foo(4); // line 14
     }

test.d(14): 'this' is only allowed in non-static member functions

  -- andy
Apr 29 2004