ccls/foo/b.cc
2017-04-18 21:58:39 -07:00

18 lines
196 B
C++

struct Parent {
virtual void Method() = 0;
};
struct Derived : public Parent {
void Method() override {}
};
void Caller() {
Derived d;
Parent* p = &d;
p->Method();
d->Method();
}