// RUN: %clang_cc1 -fsyntax-only %s struct foo { virtual void bar() ; }; template class zed : public foo { }; template class bah : public zed { void f() { const_cast(this->g())->bar(); } };