Inner function overload bug?

Era Scarecrow rtcvb32 at yahoo.com
Tue Jan 8 12:34:53 PST 2013


  Hmmm...  Curious case, I think it's a bug; Depends on if inner 
functions qualify for overloading or not.

   //globally or in struct/class/union works fine
   int test() {return 0;}
   void test(int x) {}

   unittest {
     int test() {return 0;}
     void test(int x) {} //test already defined
   }

   void func() {
     int test() {return 0;}
     void test(int x) {} //test already defined

     static int test2() {return 0;}
     static void test2(int x) {}  //test2 already defined
   }


More information about the Digitalmars-d-learn mailing list