Version: 3.0.2 (using KDE 3.2.1, compiled sources) Compiler: gcc version 3.3.1 (SuSE Linux) OS: Linux (i686) release 2.4.21-99-default Daniel: Assume two simple classes (stripped down example): -- class A { public: void print(const string& t) { print(t.c_str()); } virtual void print(const char *s) { cout << "A: " << s; } }; class B : public A { public: void print(const char *s) { cout << "B: " << s; } }; -- and a short code snipplet: -- string hello = "Hello"; A *a = new B; a->[ctrl+space] -- Here code completion offers both print-methods, therefore: -- string hello = "Hello"; A *a = new B; a->print(hello) -- As expected, gcc compiles the code, "Hello" is printed at stdout. A small change: -- string hello = "Hello"; B *b = new B; b->[ctrl+space] -- Again, code completion offers both print methods. -- string hello = "Hello"; B *b = new B; b->print(hello); -- gcc complains: -- home/daniel/cvs/test/src/test.cpp: In function `int main(int, char**)': /home/daniel/cvs/test/src/test.cpp:51: error: no matching function for call to `B::print(std::string)' /home/daniel/cvs/test/src/test.cpp:42: error: candidates are: virtual void B::print(const char*) ---- Jens Dagerbo wrote (kdevelop-devel): Quoting Eckel: "If a base class has a function name that's overloaded several times, redefining that function name in the derived class will hide _all_ the base-class versions." I don't think this is the worst bug in the CC mechanism, but it is incorrect and should probably be reported. ;)
Still valid in kdevelop-3.1.91, KDE-3.3.91 (beta1), CVS 050113
Daniel seams to be a very good user. I trush him.
Fixed in current svn