compiler: do not generate specific virtual method if compatible with the original