blob: 7d5e2e5d689fe940d4e4dc6e40d8b2005344d295 [file] [log] [blame]
// PR c++/28259
// { dg-do compile }
struct A
{
virtual A* foo(); // { dg-error "overriding" }
};
struct B : virtual A; // { dg-error "before" }
struct C : A
{
virtual B* foo(); // { dg-error "invalid covariant" }
};
B* C::foo() { return 0; }