blob: 9826f9d01285e51cbbb0106cc43b1e9fc0a6007a [file] [log] [blame]
// PR c++/85068
// { dg-do compile }
struct A;
struct B
{
virtual A *foo (); // { dg-message "overridden" }
};
struct C : virtual B
{
virtual C *foo (); // { dg-error "invalid covariant return type for" }
};
struct D : C
{
virtual C *foo ();
};