The following:
class C {
void bar();
void foo(void* p);
}
class D : C {
override void bar() const; // works
override void foo(const void* p); // error
}
produces the error:
test.d(8): Error: function test.D.foo does not override any function, did you mean to override 'test.C.foo'?
when it should compile successfully.
The covariance check is only done on the 'this' pointer. The problem is in the compiler function findVtblIndex().