Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
inherit
/
covariant22.C
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
();
};